-
Notifications
You must be signed in to change notification settings - Fork 59
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
MALLOCX_ARENA
is ignored, leading to incorrect behaviour in JSC.
#1969
Comments
At that point you really just need your own allocator. Other allocators will never support that, and I hope we can remove the jemalloc interfaces entirely from FreeBSD in future. I guess we should make mrs reject allocations with some of those flags set, but that won’t be in our 23.11 release. |
The easiest answer here is likely to link a private copy of jemalloc with suitable renaming (supported in the codebase already) and use that for these allocations. They shouldn't really be subject to revocation in the normal way, probably just when the arena is destroyed and the OS takes care of it by revoking all capabilities to the now quarantined reservation. |
Originally posted by @brooksdavis in #1964 (comment):
Sadly,
MALLOCX_ARENA
isn't just used as an optimisation here. JavaScriptCore defines an arena, setsDDC
to cover it, then usesMALLOCX_ARENA
to allocate pointers that can be used with thatDDC
(e.g. in generated code).The JSC Morello port supports a compressed-pointer mode, and this mechanism is likely to be important there, but this bug actually occurs on a standard purecap build. I'm not sure why we're using plain pointers in such a build, but it does mean that we'll see a regression until we can investigate.
For now, we'll disable revocation when we test JSC, but I thought it'd be useful to report the issue anyway.
The text was updated successfully, but these errors were encountered: