Open kyoguan opened 3 years ago
yikes! do you have links to the bug or a small reproducer? is it in libgcc or glibc? its surprising to me that freeing the meshed page wouldn't clear/purge the waiting futex, otherwise it seems like a process could get notified about a futex in a different process (if/when the memory is reused)
here: const unsigned futex_wait_op = 0; const unsigned futex_wake_op = 1;
they should be const unsigned futex_wait_op = 0 | 128; const unsigned futex_wake_op = 1 | 128;
We found the gcc lib has a bug, call the system call futex without the FUTEX_PRIVATE_FLAG flag. This would block the thread after mesh, because the phys address changed. clang' lib without this bug.
eg. std::future would trigger this bug.