This is an archive of the discontinued LLVM Phabricator instance.

Add preliminary NetBSD support in libfuzzer
ClosedPublic

Authored by krytarowski on Aug 30 2017, 11:58 AM.

Details

Summary

This code already works and passes some number of tests.

There is need to finish remaining sanitizers to get better coverage.

Many tests fail due to overly long file names of executables (>31).
This is a current shortcoming of the NetBSD 8(beta) kernel, as
certain functions can fail (like retrieving file name of executable).

Sponsored by <The NetBSD Foundation>

Diff Detail

Repository
rL LLVM

Event Timeline

krytarowski created this revision.Aug 30 2017, 11:58 AM

I'm on vacation during September, I will keep pinging for this patch but not writing new code. I will be back to development in October.

kcc edited edge metadata.Aug 30 2017, 2:56 PM

Mostly LG

lib/fuzzer/tests/CMakeLists.txt
13

I think this should be fixed on the driver side, i.e. -fsanitize=address (and similar) should add -lrt, as they do on Linux.

krytarowski added inline comments.Aug 30 2017, 3:06 PM
lib/fuzzer/tests/CMakeLists.txt
13

It might be overlinking.. but for now I will drop this part from the commit.

  • drop -lrt patch from tests
kcc accepted this revision.Aug 30 2017, 3:25 PM

LGTM, thanks!

This revision is now accepted and ready to land.Aug 30 2017, 3:25 PM

Thank you for the reviews!

In general I'm heading for tsan+msan. I need to finish proper process memory mapping.

After finishing them I will switch back to LLDB and kernel ptrace(2).

In future for lsan I need to research and add a new kernel API for StopTheWorld().

krytarowski closed this revision.Aug 30 2017, 3:45 PM