Move drsyscall to DynamoRIO
drsyscall is currently part of Dr. Memory Framework (DRMF) which is not part of DynamoRIO.
For DynamoRIO clients to use the functionalities provided by drsyscall, we need to move drsyscall to DynamoRIO similar to drwrap and drutil.
This will be done in multiple steps:
- Add drsyscall code to dynamorio
- Clang-format: after move
- Update LGPL license list in DR top level license file to include drsyscall with drwrap+drutil
- Tests outside of drsyscall/ dir: have to move separately
- Remove drsyscall from drmemory
- Fix up any hardcoded include paths in drmemory
- Update drmemory cmake code to find library from dynamorio
- Remove drsyscall from “DRMF” library docs/mentions
For DynamoRIO clients to use the functionalities provided by drsyscall, we need to move drsyscall to DynamoRIO similar to drwrap and drutil.
Note that this is not about DynamoRIO clents in general, who can check out the drmemory repository. This is about code inside the dynamorio repository. We considered checking the drmemory repository as a sub-module (modulo the reverse in drmemory) and decided moving may be the simplest way forward.
#7417 Adds DrSyscall tests to Linux x86 CI tests.
For Windows, drsyscall_test, strace_sample, and strace_test fail in drsyscall_os_init() when the spot check fails after detecting syscall mismatch for NtGetContextThread (236 vs 235).
In DrMemory, these tests are currently running for x86 only. The Windows CI tests do not run any tests due to:
cl : Command line error D8021 : invalid numeric argument '/Wno-all' ninja: build stopped: subcommand failed. Command exited with the value: 1
I am getting this build error on RHEL 7.9. There is no struct statx in linux/stat.h on this machine.
dynamorio/ext/drsyscall/table_linux.c:1425:20: error: invalid application of 'sizeof' to incomplete type 'struct statx'
{4,sizeof(struct statx),W},
Let me send a PR to fix that. #7425
#7425 has merged into master.
Thanks for the quick fix! :)
I had to update the drmemory drsyscall for the Ubuntu22 upgrade in DynamoRIO/drmemory#2561 so now it has diverged: so it would be good to remove from drmemory to avoid this duplication causing maintenance issues.