Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement proper utf-16 string reading for log_utf16 #1419

Closed
evgenykuzyakov opened this issue Oct 7, 2019 · 3 comments
Closed

Implement proper utf-16 string reading for log_utf16 #1419

evgenykuzyakov opened this issue Oct 7, 2019 · 3 comments

Comments

@evgenykuzyakov
Copy link
Collaborator

Right now it's based on assembly script string format.

@MaksymZavershynskyi
Copy link
Contributor

Why is it based on AS format? Looks generic to me.

evgenykuzyakov pushed a commit that referenced this issue Oct 8, 2019
Expose guest panic message in GuestPanic error.

Slightly modifying ABORT message format to avoid escaping strings.
Introduce panic_utf8 API in runtime to throw a new message.
Fixed underflow issue with AS abort function.
Created TODO #1419 for log_utf16

More error checks going to be used in #1408
@evgenykuzyakov
Copy link
Collaborator Author

evgenykuzyakov commented Oct 8, 2019

Before #1420 fix, log_utf16 was using get_utf16 which uses AS string length read from ptr - 4, see https://github.com/nearprotocol/nearcore/blob/ba0815679765851b45e59d6fb173c67672875119/runtime/near-vm-logic/src/logic.rs#L1337-L1352

@MaksymZavershynskyi
Copy link
Contributor

@fckt FYI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants