Closed JamesLee-Jones closed 1 month ago
This can be demonstrated by creating test.h:
#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && defined(__CONFIG_H__) # error test.h must be #included before system headers #endif
and test.c:
#include "test.h" int main() { int x = 1 + 2; }
This compiles with clang test.c, but after running dredd test.c the modified program no longer compiles and gives the error
clang test.c
dredd test.c
./test.h:2:4: error: test.h must be #included before system headers
In more complicated projects, such as binutils, this can cause Dredd to fail to instrument any of the source files.
This can be demonstrated by creating test.h:
and test.c:
This compiles with
clang test.c
, but after runningdredd test.c
the modified program no longer compiles and gives the errorIn more complicated projects, such as binutils, this can cause Dredd to fail to instrument any of the source files.