-
Notifications
You must be signed in to change notification settings - Fork 9
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
ASLR and "malloc returned something that is in RVM address space" #158
Comments
wks
added a commit
that referenced
this issue
Mar 20, 2024
The boot images are built with the assumption that they will be loaded at a specific address. ASLR will cause some shared objects to be loaded at the addresses of the boot images, and the boot images will overwrite their sections, causing illegal instruction errors and other errors. This problem is easy to reproduce locally, and manifests very frequently when running on GitHub CI. This PR modifies CI scripts to mitigate the problem. It adds `setarch -R` before executing `rvm` to disable ASLR. This PR is a workaround. The proper fix is take control over the loading process and not let the system loader load shared objects in the address range of the boot image. Related issue: #158
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When executing
rvm
, there is a 50% chance that the error message "malloc returned something that is in RVM address space" will appear. For example:It seems to be related to address space layout randomization (ASLR). If I turn ASLR off using
setarch -R
, the error message disappears.So it may be related to the way malloc and mmtk-core manages the address space. I am not sure whether it is related to a random failure like this:
The text was updated successfully, but these errors were encountered: