-
-
Notifications
You must be signed in to change notification settings - Fork 697
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
fix wrong out of memory in edge cases, just try allocate from block for one source of truth #4836
base: master
Are you sure you want to change the base?
Conversation
…or one source of truth
Not sure why netbsd and freebsd are segfaulting |
I can reproduce the NetBSD segfault. However, when I hook a debugger up to it (lldb or gdb), the segfault ceases to happen, making this harder to pin down. |
Looks like it's segfaulting on this line in
The value of Digging further, it looks like Checking
After seeing that we use |
@Feoramund thanks so much for looking into this!
I think the fact it is actually returning
I've looked at the manpages too, and I am thinking we may need to do this for NetBSD, to allow any protection later being enabled with mprotect? (I don't think we can just give the mmap call
FreeBSD seems to have a similar thing (although that one doesn't fail the CI 🤔 ):
|
Interesting extensions. That looks like the real fix here then, to use that for both FreeBSD (just in case) and NetBSD. I mentioned raising a panic on |
@Feoramund Thanks again, the changes seem to work. This is ready to merge. |
Follow up on #4835
Fixes #4834
Also fixes an already existing bug where on NetBSD and FreeBSD we are doing
mmap
with no protection flags set, on these targets we need to specify a special "maximum" protection value in order to properlymprotect
with more permissions.