-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc] fix scudo integration build #116979
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
Conversation
@llvm/pr-subscribers-libc Author: Schrodinger ZHU Yifan (SchrodingerZhu) ChangesFYI, scudo is using our header while not using our implementation. Full diff: https://github.com/llvm/llvm-project/pull/116979.diff 1 Files Affected:
diff --git a/libc/test/integration/scudo/CMakeLists.txt b/libc/test/integration/scudo/CMakeLists.txt
index a5f7e3b63d24c3..06d7ee6eca67d7 100644
--- a/libc/test/integration/scudo/CMakeLists.txt
+++ b/libc/test/integration/scudo/CMakeLists.txt
@@ -21,6 +21,15 @@ add_entrypoint_library(
libc.src.errno.errno
libc.src.unistd.__llvm_libc_syscall
libc.src.sched.__sched_getcpucount
+ libc.src.unistd.sysconf
+ libc.src.sys.auxv.getauxval
+ libc.src.sys.prctl.prctl
+ libc.src.sys.mman.mmap
+ libc.src.sys.mman.munmap
+ libc.src.unistd.read
+ libc.src.unistd.write
+ libc.src.unistd.close
+ libc.src.fcntl.open
)
add_executable(
|
Thanks for fixing this! At some point I want to address the comment I left in this file and make this a proper integration test, so I'll file an issue for that. |
Thanks for figuring this out! It had me stumped yesterday. Can you tell me a little more about how you ended up figuring this out? |
@nickdesaulniers I am not sure why it does not reproduce on your side, but it just reproduces and the debugging story starts there. So I just attached the debugger and found out that it errors out on a failure of Then, it just comes to me that the allocator may get the wrong page size. I re-run the test with debugger attached, and I tried So, it must be the case that the implementation does not match the header. Indeed, the test can be fixed by enforcing the symbol implementation from our side. My guess: the reason why it does not reproduce may be related to how header to inclusion is passed to scudo. Maybe @lntue and you are not using fullbuild? |
Ah! I was reproducing on the buildbot, and was attaching gdb to spot a malloc that would fail.
I guess I didn't spot that Anyways, bravo, nice work! |
FYI, scudo is using our header while not using our implementation.