This is an archive of the discontinued LLVM Phabricator instance.

Set of corrections for MSan/NetBSD
ClosedPublic

Authored by krytarowski on Dec 9 2017, 5:54 PM.

Details

Summary

Changes:

  • Don't attempt to intercept GLIBC specific functions like __strtol_internal. This is required to stop intercepting it as we leak dlerror(3) for dlsym(3) that cannot manage to find a symbol.
  • Correct interception of fstatat(2).
  • Don't run a test for fgetgrent_r() that is missing on NetBSD.
  • Correct link_map location (offset) in Obj_Entry on x86_64 and i386.
  • Stop intercepting getpshared-like functions in pthread(3). This is feature is not enabled by default on NetBSD as it's unfinished.
  • Switch intercepting from UTMP to UTMPX functions.

Sponsored by <The NetBSD Foundation>

Diff Detail

Event Timeline

krytarowski created this revision.Dec 9 2017, 5:54 PM
********************
Testing Time: 94.77s
********************
Failing Tests (7):
    MemorySanitizer-x86_64 :: chained_origin_with_signals.cc
    MemorySanitizer-x86_64 :: dtls_test.c
    MemorySanitizer-x86_64 :: fork.cc
    MemorySanitizer-x86_64 :: sem_getvalue.cc
    MemorySanitizer-x86_64 :: signal_stress_test.cc
    MemorySanitizer-x86_64 :: textdomain.cc
    MemorySanitizer-x86_64 :: tzset.cc

  Expected Passes    : 97
  Expected Failures  : 1
  Unsupported Tests  : 27
  Unexpected Failures: 7
vitalybuka accepted this revision.Dec 13 2017, 5:06 PM
This revision is now accepted and ready to land.Dec 13 2017, 5:06 PM

Thanks for review!

I'm now busy working on all-the-syscalls and all-the-ioctls from NetBSD.

Without that I'm observing false positives even in cat(1) sanitized with MSan.

This revision was automatically updated to reflect the committed changes.