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
watchOS apps crash on launch if built with LLVM #13454
Comments
@lewurm could you please check this |
@rolfbjarne provided some more logs. Crash caught in the debugger: https://gist.github.com/rolfbjarne/e333fb4b7704c3c311a7cf7c631cd864 Rolf added some more logging around the crash site:
Here are the bitcode files in case someone wants to look at it: I looked into all the logs, but I didn't discover anything suspicious 🙁 As a reference, here is the slack conversation with more context: https://xamarinhq.slack.com/archives/C03CCJNR7/p1552567685389000 @vargaz do you have any idea what that could be? |
@vargaz any thoughts on that? |
It might be related to #13006 |
FWIW log output with |
Friendly reminder/poke that this needs to happen in the d16-2 timeframe, preferably before 2019-02 lands, else we were be breaking watch then. |
I can reproduce on my Apple Watch Series 3. Additionally, I get this message on the output as well:
|
with some counting tricks, I got this back trace:
I need to dechiper the handles code, but wild guess: There was a big commit in the handles code after |
It looks like the NULL value comes from managed code. Its supposed to be the return value of |
@lewurm could be this call to
I notice that the So if it's reasonable for GetConstructors_native to return null, the SafeGPtraArrayHandle should be fixed up, if not, we need to figure out why the constructors icall is returning null |
It can only return null here: |
according to my logging we take this exit Line 4348 in fd4b429
I added this before the return printf ("\tnormal exit for class: %s\n", mono_type_full_name (&klass->_byval_arg)) and prints
|
"nice", I don't get that
lldb timeouts on the watch prevent me to single step through it 😡 |
This bitcode
turns into that machine code
So this is the C# code for it: mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs Lines 256 to 259 in 9412149
Why are @vargaz does that ring a bell? |
I assume they are passed as LLVMArgAsIArgs, which is passed as a set of IntPtr()-s: |
I think this is wrong: #12992 :( |
diff --git a/mono/mini/mini-arm.c b/mono/mini/mini-arm.c
index 82c05db8462..f4ebd7655c6 100644
--- a/mono/mini/mini-arm.c
+++ b/mono/mini/mini-arm.c
@@ -2375,7 +2375,7 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
* passing structs with sizes up to 8 bytes in a single register.
* On armv7k slotsize=8 boils down to the same generated native
* code by LLVM, so it's okay. */
- slotsize = 8;
+ slotsize = 4;
#else
slotsize = eabi_supported && ainfo->align == 8 ? 8 : 4;
#endif this fixes it, but I've to think about a proper solution so it doesn't break release mode of |
We can't use `slotsize=8` on `armv7k` as it leads to stack corruption. Note that `mtouch` already calls the AOT compiler with `--aot=mtriple=arm64_32-ios`, so no changes are required there. Regression introduced by mono#12992 Fixes mono#13454
We can't use `slotsize=8` on `armv7k` as it leads to stack corruption. Note that `mtouch` already calls the AOT compiler with `--aot=mtriple=arm64_32-ios`, so no changes are required there. Regression introduced by mono#12992 Fixes mono#13454
We can't use `slotsize=8` on `armv7k` as it leads to stack corruption. Note that `mtouch` already calls the AOT compiler with `--aot=mtriple=arm64_32-ios`, so no changes are required there. Regression introduced by mono#12992 Fixes mono#13454
[2019-04] [arm] fix armv7k regression on struct passing We can't use `slotsize=8` on `armv7k` as it leads to stack corruption. Note that `mtouch` already calls the AOT compiler with `--aot=mtriple=arm64_32-ios`, so no changes are required there. Regression introduced by #12992 Fixes #13454 Backport of #14362. /cc @lewurm
Steps to Reproduce
Current Behavior
Crash at launch.
Application output isn't very helpful:
A lldb session doesn't help much either: https://gist.github.com/rolfbjarne/42efa81e405c86f6eafc278483dadec0.
Expected Behavior
No crash.
On which platforms did you notice this
[x] watchOS (only armv7k, doesn't repro on arm64_32 with the new arm64_32 support).
[ ] macOS
[ ] Linux
[ ] Windows
Version Used:
xamarin-macios: master (xamarin/xamarin-macios@96ae30a)
The text was updated successfully, but these errors were encountered: