-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Crash when GetHashCode
is called under specific circumstances
#87551
Comments
From @rdavisau on Tue, 13 Jun 2023 21:37:34 GMT (Confirmed this still reproduces on p5 and updated the Environment details) |
From @rolfbjarne on Wed, 14 Jun 2023 10:11:59 GMT I can reproduce the crash. It only happens when LLVM is enabled. lldb session on device: https://gist.github.com/rolfbjarne/bb24af32b545371d4ff314391e6abd6f Output without lldb: https://gist.github.com/rolfbjarne/dc0ec66a78140d49c523eecf81705a19 I have a few local changes to make it clearer that the crash happens when calling GetHashCode: https://gist.github.com/rolfbjarne/e3bdaaba00fe0e55d7c74b27e0a75242 I build like this:
I'm moving to dotnet/runtime since this seems like a regression with our LLVM support. |
CC @vargaz |
This might be an incorrect conclusion, because I didn't see that the test project does this: |
Can't reproduce this with the test repo. |
@vargaz which .NET versions do you have installed? This is mine:
|
Same here. |
@vargaz that's weird. Can you get a binlog? |
Attached. The first is from: |
I guess these all produce debug builds, but for me the issue only reproduces on a release build. For me, this crashes: This doesn't (removed |
I can reproduce in release config. |
A reduced testcase:
|
…ables. Ldaddr requires the emission of dummy uses for gsharedvt_info_var/gsharedvt_locals_var and the copy wouldn't have these, leading to register allocation problems. Fixes dotnet#87551.
From @rdavisau on Tue, 13 Jun 2023 13:46:50 GMT
Steps to Reproduce
(this seems to be a net8 regression, here's my attempt to get close to isolating the specific trigger/s for the issue through trial and error)
T
and stashes theT
instance and aFunc<T,?>
"identifier-getter" that is called against the wrapped instance whenever objc triggersGetNativeHash
GetNativeHash
to be triggered from native code.Expected Behavior
The wrapper instance can be used with native types in expected ways without issues, as when run under net7 on device, or under net8 on simulator (/debug??) builds.
Actual Behavior
Environment
Version information
Build Logs
msbuild.binlog.zip
Example Project
https://github.com/rdavisau/ios-net8-funchash-repro
Run on net7 (works)
./net7.sh [DEVICE UDID]
Run on net8 (crashes)
./net8.sh [DEVICE UDID]
All relevant code is in
AppDelegate.cs
. The commented out instantiations (1 - 4) all work on both net7 and net8. The final instantiation causes the crash when theNSSet
is being created.This has easy workarounds (use the 'not problematic' instantiation, or calculate and stash the identifier in the constructor), but since it 'used to work' in net7 I figure it is worth raising.
Copied from original issue dotnet/macios#18442
The text was updated successfully, but these errors were encountered: