This is an archive of the discontinued LLVM Phabricator instance.

Reuse sanitizer_linux for NetBSD
ClosedPublic

Authored by krytarowski on Aug 4 2017, 9:31 AM.

Details

Summary

Follow FreeBSD and reuse sanitizer_linux for NetBSD.

Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

Sponsored by <The NetBSD Foundation>

Diff Detail

Repository
rL LLVM

Event Timeline

krytarowski created this revision.Aug 4 2017, 9:31 AM
fjricci edited edge metadata.
fjricci added a subscriber: dvyukov.

Adding @dvyukov for the futex stuff.

lib/sanitizer_common/sanitizer_linux.cc
30

Maybe #if SANITIZER_LINUX is clearer?

440

What's the difference between this and the non-NETBSD case? Does the cast to uptr make a difference?

  • Replace !freebsd && !netbsd with linux check.
  • NanoTime fix for NetBSD
krytarowski marked 2 inline comments as done.Aug 4 2017, 2:42 PM
krytarowski added inline comments.
lib/sanitizer_common/sanitizer_linux.cc
440

We need internal_syscall_ptr, as arguments are pointers.

fjricci accepted this revision.Aug 8 2017, 1:26 PM
This revision is now accepted and ready to land.Aug 8 2017, 1:26 PM
krytarowski closed this revision.Aug 8 2017, 1:36 PM
krytarowski marked an inline comment as done.