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

WIP: Throw MemberAccessException when abstract class is used with newobj instruction #902

Open
wants to merge 271 commits into
base: unity-main
Choose a base branch
from

Conversation

joncham
Copy link
Member

@joncham joncham commented Apr 5, 2018

case 974435 - Avoid crash when abstract class used with newobj opcode

mderoy and others added 30 commits December 6, 2017 09:12
* use more il2cpp types

* Renamed method->declaring_type to method->klass (#731)
…il2cpp-debugger-scopes

Enabling support for scopes in methods in the debugger
* use more il2cpp types

* Renamed method->declaring_type to method->klass

* Remove Il2CppMonoType

* Remove VM_CLASS macros, and IL2CppMonoClass

* Remove VM_IMAGE macros and IL2CPPMonoImage

* Remove VM_METHOD macros and Il2CppMonoMethod

* Remove VM_METHOD macros and Il2CppMonoMethod

* Remove VM_GENERIC and VM_ARRAY macros and remove Il2CppMonoArray, Il2CppMonoGeneric<x>

* Remove VM_PROPERTY macros and Il2CppMonoProperty

* Remove Il2cppMonoString

* Remove VM_ARRAY Macros and Il2CppMonoArray

* Remove VM_THREAD and VM_INTERNAL_THREAD macros and Il2CppMonoThread and Il2CppMonoInternalThread

* cleanup profiler, reflectiontype, ghashtable

* Remove VM_DOMAIN_GET_ASS...macro fix not taking the address of byval_arg and this_arg

* Fix property test broken due to defining wrong propertyinfo struct
* Remove VM_ASSEMBLY Macros and Il2CppMonoAssembly

* Remove define around image->dynamic
…ions (#750)

* remove more fake types

* Remove Il2cppMonoDomain

* remove more structs
…debugger-step-to-catch

Implementing step-to-catch for il2cpp debugger
There is no need to use BSTR marshaling to convert a SecureString to a
string. On some platforms, BSTR marshaling is not implemented, but we
still want to be able to convert a SecureString to a string on those
platforms.

So instead, use Unicode string marshaling.
Avoid using BSTR for conversion of a SecureString
Changed namespaces from UnityTls to Unity, change casing from 'TLS' to 'Tls'
…tr to Int8=byte ptr since char has a different meaning in C# than in C
…pdated UnityTls interface with trace methods
CheckAndThrow for verify results forwards now to the one without verify result.
joncham and others added 23 commits March 21, 2018 16:57
…-minimum-runtime

Add .NET FW to beginning of path rather than end for referencing MSBuild.exe
…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.
Graft marshal changes from old mono (Case 1013898)
…string-allocations

case 1015822 - Avoid assert and crash on invalid text content
…-on-connect-error

This fixes an issue we are seeing with VSTU debgugging in Unity. (mono#7634)
…boo-in-unityscript-folder

Add boo to unityscript folder
…k-alignment-structs-android

[arm] fix stack alignment for structs (mono#7691)

case 915869 - Fix pinvoke structure alignment on Android
case 960482 (maybe) - Fix Marshal.PtrToStructure alignment on Android
…ry-mapped-file-icalls

Sync with IL2CPP changes for memory mapped files
this to check if a class has a static constructor, so we can call it
before a static method gets invoked.
The corefx implementation of Linq is not AOT-friendly, and won't work
with IL2CPP until IL2CPP gets full generic sharing support. So use the
Linq implementation from reference source for the unityaot profile. This
implementation is AOT-friendly.

This change addresses case 1013854 in Unity.
When a connection fails, the socket error was being incorrectly reported
as an address family not supported error, instead of connection refused.

It looks like this happened between
c4e698c (Unity 2018.1b5), where the
proper error was reported, and ec98a4e
(Unity 2018.1b6), there the incorrect error is reported.

Why did this happen? Between those two changesets (there are about 180
intervening changesets), the order of addresses returned from
`Dns.GetHostAddresses` changed. The newer code returns the IPv6 address
first, and the IPv4 address second. While `GetCheckedIPs` mentioned in a
comment that it skips addresses that don't match the address family, it
did not. The code using the addresses returned by `GetCheckedIPs` will
use the first address in the array. If this address happens to match the
address family of the socket, things will work "properly" (the correct
socket error will occur).

If, however the first entry has the wrong address family, then the
socket error will be an address family not supported error, since the
socket was created with different address family.

This change modifies `GetCheckedIPs` to filter the addresses, removing
those which do not match the address family.

This corrects Unity case 1012875.
Report the proper socket error (case 1012875)

Release notes:
Scripting: Provide the proper socket error when an IPv4 connection is refused.
@joncham joncham force-pushed the unity-master-alloc-abstract-class-exception branch from fe261fa to d1feca2 Compare April 5, 2018 19:31
@mderoy
Copy link

mderoy commented Aug 13, 2018

@joncham Any reason this hasn't been merged to resolve 974435?

@unity-cla-assistant
Copy link
Collaborator

unity-cla-assistant commented May 19, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 10 committers have signed the CLA.

✅ AndreasReich
✅ joshpeterson
❌ Brian Raderman
❌ TautvydasZilys
❌ mderoy
❌ lewurm
❌ davidrogers-unity
❌ akoeplinger
❌ lambdageek
❌ lateralusX


Brian Raderman seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.