DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.61k stars 554 forks source link

linux.bad-signal-stack test fails when run in a container under Ubuntu 22.04 #6615

Closed philramsey-arm closed 7 months ago

philramsey-arm commented 7 months ago

bad-signal-stack.c includes tools.h which defines _GNU_SOURCE. Having _GNU_SOURCE defined when signal.h is included causes the test to fail when run in a Ubuntu 22.04 container.

This can be fixed by including tools.h after the other header files, as other source files like signal_pre_syscall.c do.

To Reproduce

On Ubuntu 22.04:

docker run --rm -it --name dynamorio ubuntu/base:22.04 bash

git clone https://github.com/DynamoRIO/dynamorio.git && cd dynamorio git submodule init git submodule update

build tests

cd .. mkdir dynamorio_build cd dynamorio_build cmake -DDEBUG=ON -DBUILD_TESTS=ON ../dynamorio make -j

run tests

ctest --output-on-failure --timeout 120