Repository navigation
Replies: 2 comments
|
From the symptom it can be caused by stack overflow. |
|
The reason changing 1. ARM64 Calling Convention (AAPCS64) and Indirect Return (
|
|
From the symptom it can be caused by stack overflow. |
|
The reason changing 1. ARM64 Calling Convention (AAPCS64) and Indirect Return (
|
Uh oh!
There was an error while loading. Please reload this page.
Platform / Build
Symptom
So the only change that consistently fixes it is turning the large return type from struct → class.
Relevant code (simplified)
If I change Data to a class and update code accordingly, crashes stop.
Minimal native crash excerpt (from .ips)
No managed stack/exception shows. It’s a native abort:
So: native SIGSEGV right after we finish building/returning the large struct; no managed exception surfaces.
What we tried
Question
Why would returning a very large, deeply nested struct from AOT’d .NET iOS code cause sporadic native SIGABRT (no managed exception), while the exact same logic works on Android/WPF — and switching that type to a class fixes it on iOS?
Any pointers to best practices (e.g., prefer classes for large DTOs on iOS, use ref struct/in/out patterns, or known fixes/workarounds) would be hugely appreciated.
All reactions