Closed DonggeLiu closed 2 years ago
Thanks for the report. We'll investigate.
My guess, w/o actually checking yet...
In runner.cc
, inside SetLimits()
we have if constexpr (kCanUseRlimitAs) { ...
kCanUseRlimitAs
is supposed to be false when building with ASAN,
but it is computed via #ifndef ADDRESS_SANITIZER
, which is not what ASAN sets by default
(in google-internal environment it does, for historical reasons).
Thanks!
I guess I can verify this theory later today by manually setting ADDRESS_SANITIZER
to true
and re-run : )
In the OSS version, we build the centipede runner with the default bazel flags and then link this run-time against the target, asan or not. I.e. the runner will be the same, it will have ADDRESS_SANITIZER=0
.
So, I guess a better solution is to check for asan/tsan/msan at run-time as opposed to at-compile time. On it.
This one can be fixed relatively easy, by checking for ASAN/TSAN/MSAN in the runner at run-time, as opposed to at compile time. #203 sent
I just realized we have a similar problem with the interceptors, which should be present in the non-asan build, and should not be present in the ASAN build. See https://github.com/google/centipede/blob/main/runner_interceptors.cc The solution we use internally is to build the centipede runner with the correct sanitizer. Not sure it easily apples to the OSS world
Thanks : ) I will test the new code today and keep everyone updated!
Just tested the latest code with a (short) experiment: It appears that the bug has been fixed : )
I will close this issue and update Centipede
in OSS-Fuzz
.
Thanks again!
Segmentation Fault
Centipede
runs into the following segmentation fault after a check failure:Reproduce
The SegFault can be reproduced with Scarecrow, a minimum target with a planted memory leak that can be captured by the Address Sanitizer. The sanitized and unsanitized targets are respectively built by:
Then the SegFault can be reproduced by:
While the following two commands are free from the SegFault and work fine:
My Guess
Empty corpus file. The check failure and SegFault happened on the following line:
which points to the
batch_result
(which I reckon is the result?). Filecorpus.0
and directorycorpus/
are both empty when the SegFault happens; They were not empty in the other cases above. Maybe the testcase was not successfully saved intocorpus.0
andcorpus/
?Please let me know if you could reproduce the SegFault or if more information is required, thanks!