-
Notifications
You must be signed in to change notification settings - Fork 408
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
Fixes for SerenityOS #689
Fixes for SerenityOS #689
Conversation
Okay, looks good, except for the comment regarding MPROTECT_VDB! I will process the PR in several day. |
This causes a null pointer dereference crash when building without SMALL_CONFIG. See: ivmai#688
SerenityOS only supports MADV_SET_VOLATILE/MADV_SET_NONVOLATILE and returns EINVAL for MADV_DONTNEED: https://github.com/SerenityOS/serenity/blob/b88cd185a0ec40fc10405b555507aa6f0aab8222/Kernel/Syscalls/mmap.cpp#L355-L388 See: ivmai#688
87821a6
to
ed1af4f
Compare
I would prefer the next port update to be dropping serenity's patches altogether, happy to wait for this PR to be merged first :) |
(fix of commit b48ee2b) PR #689 (bdwgc). As of now, Serenity OS only supports `MADV_SET_VOLATILE` and `MADV_SET_NONVOLATILE` as `advice` argument to `madvise()`. The later returns `EINVAL` for other `advice` values (including `MADV_DONTNEED`). * os_dep.c [USE_MUNMAP && !USE_WINALLOC && !SN_TARGET_PS3 && SERENITY] (block_unmap_inner): Call `mmap(PROT_NONE)` instead of `mprotect(PROT_NONE)` and `madvise(MADV_DONTNEED)`.
(fix of commit b48ee2b) PR #689 (bdwgc). For an unknown reason, enabling of incremental mode based on `mprotect` causes a null pointer dereference in `GC_finish_collection()`. This patch removes `define MPROTECT_VDB` for Serenity OS. * include/private/gcconfig.h [SERENITY] (MPROTECT_VDB): Do not define. * os_dep.c [MPROTECT_VDB && !DARWIN && !MSWIN32 && !MSWINCE && SERENITY] (CODE_OK): Likewise. * os_dep.c [MPROTECT_VDB && !DARWIN && !USE_WINALLOC && !AIX && !CYGWIN32 && !HAIKU]: Include `sys/syscall.h` regardless of `SERENITY`.
Merged. Please test. |
See commit messages and #688 for details.