Skip to content

Commit e07e77e

Browse files
committed
ASan: Run with verify_asan_link_order=0.
Avoids error message: ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD. Affected tests: nested_detach_kill nested_detach_kill_stuck nested_detach_wait
1 parent 002528b commit e07e77e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,13 @@ size_t saved_argv0_space() {
233233

234234
using namespace rr;
235235

236+
#ifdef __SANITIZE_ADDRESS__
237+
#include <sanitizer/asan_interface.h>
238+
const char *__asan_default_options() {
239+
return "verify_asan_link_order=0";
240+
}
241+
#endif
242+
236243
int main(int argc, char* argv[]) {
237244
rr::saved_argv0_ = argv[0];
238245
rr::saved_argv0_space_ = argv[argc - 1] + strlen(argv[argc - 1]) + 1 - rr::saved_argv0_;

0 commit comments

Comments
 (0)