ramosian-glider / sanitizer-issues

test
0 stars 0 forks source link

Investigate occasional "WTF? should_instrument_==false in event_basic_block, module=`/lib/ld-2.11.1.so`" messages when running DRT on "full DRASan" #93

Closed ramosian-glider closed 9 years ago

ramosian-glider commented 9 years ago

Originally reported on Google Code with ID 93

To reproduce:
1) Apply the following patch to WebKit:
third_party/WebKit$ git diff
diff --git a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
index e589df2..0ad4091 100644
--- a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
@@ -113,8 +113,11 @@ static void runTest(TestShell& shell, TestParams& params, const
string& testName
     shell.setLayoutTestTimeout(oldTimeoutMsec);
 }

+extern "C" void __asan_init();
+
 int main(int argc, char* argv[])
 {
+    __asan_init();
     WebKitSupportTestEnvironment testEnvironment;
     platformInit(&argc, &argv);

===EOF===

2) Build DRT with the stub runtime:
$ gcc -c -oasan_stub_rtl.o chrome/test/pyautolib/asan_stub.c
$ GYP_DEFINES="linux_use_tcmalloc=0 component=static_library libraries_for_target='asan_stub_rtl.o
-rdynamic'" gclient runhooks
$ make BUILDTYPE=Release DumpRenderTree

3) Make sure the stub runtime is linked in:
$ nm -D out/Release/DumpRenderTree | grep -q " T .*asan" && echo "OK" || echo "FAIL"

4) Run DRT under DRASan on the attached bb.html A FEW TIMES:
  drasan$ dr/build/bin64/drrun -ops "-max_bb_instrs 300" -client build/libdr_asan.so
0 "" path/to/DumpRenderTree "file:///home/$USER/Downloads/bb.html" >/dev/null
Make sure to see the "INFO: Not found __asan_address_is_poisoned, will instrument the
main module too." message.

I often (but not always!) observe these lines:
WTF? should_instrument_==false in event_basic_block, module=`/lib/ld-2.11.1.so`
WTF? should_instrument_==false in event_basic_block, module=`/lib/ld-2.11.1.so`

This shouldn't happen as we call dr_module_set_should_instrument(..., false) on the
/lib/ld module...
Not sure if it's a DRASan or DynamoRIO bug.

Reported by timurrrr@google.com on 2012-07-20 09:55:23


ramosian-glider commented 9 years ago
Yeah, probably a DR bug in the module filter.

Reported by rnk@google.com on 2012-07-20 13:14:45

ramosian-glider commented 9 years ago
still valid? 

Reported by konstantin.s.serebryany on 2013-12-27 11:15:31

ramosian-glider commented 9 years ago
OK, this is very likely an issue in DR and we're not blocked by this in *Sans, so I'll
wontfix and file a DR issue (a bit later).

Reported by timurrrr@google.com on 2013-12-27 12:08:07

ramosian-glider commented 9 years ago
Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:12:59