DynamoRIO / drmemory

Memory Debugger for Windows, Linux, Mac, and Android
Other
2.43k stars 262 forks source link

if -callstack_max_frames truncates suppression to ... drmem then aborts #678

Open derekbruening opened 9 years ago

derekbruening commented 9 years ago

From bruen...@google.com on November 09, 2011 12:54:04

running chrome with "-suppress C:\src\chromium\src\tools\valgrind\DrMemory\suppressions.txt" and -callstack_max_frames 6 (or smaller) => aborts but not a very visible message (b/c this is chrome.exe launched by ui_tests: direct app launch).

have to go look in global log:

Recorded 32 suppression(s) from default C:\src\drmemory\git\build_drmemory/bin/suppress-default.txt WARNING: requested max frames truncates suppression callstacks Malformed suppression: LEAK RSAENH.dll!DllUnregisterServer ... ADVAPI32.dll!CryptAcquireContextA CRYPT32.dll!CryptEnumOIDFunction ... CRYPT32.dll!CertFindCertificateInStore

The given suppression ends with '...' Usage error: Malformed suppression. See the log file for the details. Aborting.

question: if user says "-callstack_max_frames 4" and has some suppressions longer than 4, today we truncate those suppressions. this can end up with an illegal suppression (ending with ...) and drmem aborting w/ probably a confusing error. are there better solutions. should the max frames be adjusted to be big enough for biggest suppression, ignoring the user's requested max? should illegal suppression checks be relaxed in presence of short max?

xref issue #672

Original issue: http://code.google.com/p/drmemory/issues/detail?id=678

derekbruening commented 9 years ago

From rnk@google.com on November 09, 2011 11:08:02

Another proposal (not sure if I like it, just sending for completeness) would be to truncate the suppression, and if the suppression ends in ..., remove that frame to ensure that the suppression is still valid. It might be worth emitting a warning if this happens.

derekbruening commented 9 years ago

From bruen...@google.com on November 09, 2011 11:12:26

Another proposal (not sure if I like it, just sending for completeness) would be to truncate the suppression, and if the suppression ends in ..., remove that frame to ensure that the suppression is still valid. It might be worth emitting a warning if this happens.

That's essentially what is meant by "illegal suppression checks be relaxed in presence of short max". There's already a warning about suppressions being truncated with short max. Warnings today are all in the global logfile though and not results.txt b/c many are for developers not users.