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

Unity master invalid string allocations #880

Merged
merged 2 commits into from
Mar 23, 2018

Conversation

joncham
Copy link
Member

@joncham joncham commented Mar 20, 2018

case 1015822 - Avoid assert and crash on invalid text content

lambdageek and others added 2 commits March 23, 2018 09:01
…mono#6333)

Revert the embedding API behavior change introduced by dcdfb3c

mono_string_new will:
 * return NULL if the given byte sequence is not a valid UTF-8 sequence
 * assert if there is not enough memory to allocate a new MonoString.

This only changes the behavior of the API function.  The runtime will continue
to use mono_string_new_checked which sets MonoError* for both sorts of
failures.
In commit 8ba48b5
mono_string_new was adjusted to only assert for
out of memory rather than all errors to preserve
previous behavior for invalid strings. This
change preserves behavior for mono_string_new_wrapper.
@joncham joncham force-pushed the unity-master-invalid-string-allocations branch from 2cde5cd to f650db8 Compare March 23, 2018 13:02
@joncham joncham merged commit 96d5379 into unity-master Mar 23, 2018
@joncham joncham deleted the unity-master-invalid-string-allocations branch March 23, 2018 16:43
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

Successfully merging this pull request may close these issues.

3 participants