-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
AMD64 Register dumper is used on ARM platforms. #3840
Comments
add DarwinArmUContextRegisterDumperFeature for Platform.IOS_AARCH64
suggested fix: Montura@f04db55 |
The suggested fix doesn't really fix the issue; the methods should be populated correctly. |
It prevents from invalid memory access. We can file a new issues to improve ARMRegisterDumper. |
This fix works for iOS development and production. I agree that ARMRegisterDumper need more work to be better, but it can be done later and it minor. |
@teshull, hi! What about this fix Montura@d2f5b59. Is it enough? Or I have to "fill" MContextArm64 with all the fields from _STRUCT_MCONTEXT64 https://github.com/xybp888/iOS-SDKs/blob/master/iPhoneOS11.2.sdk/usr/include/arm/_mcontext.h#L61
https://github.com/xybp888/iOS-SDKs/blob/master/iPhoneOS11.2.sdk/usr/include/mach/arm/_structs.h#L96
Anyway I can't fill this methods properly, because I don't know in which general-purpose registers (x[29]) do you save HeapBase and Thread pointers.
|
Hi @Montura Thanks for the reference to the aarch64 structs. I started to look at this as well earlier today. I should merge a solution into master in the next week or so. For future reference, on AArch64 the thread pointer is r28 and heap base pointer is 27. This information can be found in |
@teshull, I'll check it tomorrow. |
do we need to check it ? |
I like to keep this code the same as in HotSpot; it doesn't hurt to keep it in |
can we see this in 21.3 ? |
No, unfortunately it is too late for that. #3859 will be part of 22.0 |
This is not good, we have to use own build again in CI. We could do my fix for 21.3 and yours for 22 |
The freeze for 21.3 was ~ a month ago, so it's too late to put any new things into it. If you don't want to build yourself, I imagine soon a nightly for 22.0 should be available here: https://github.com/graalvm/graalvm-ce-dev-builds/releases |
Currently, on Darwin systems only AMD64 register dumper is used, even on ARM (Platform.IOS_AARCH64):
This defect lead to weird behaviour like request for AMD64 registers in .cap files during IOS_AARCH64 build:
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rax:PropertyInfo:size=8
All versions of GraalVM affected.
The text was updated successfully, but these errors were encountered: