This is an archive of the discontinued LLVM Phabricator instance.

Reland: Refactor mutation strategies into a standalone library
AbandonedPublic

Authored by aarongreen on May 27 2021, 7:13 AM.

Details

Summary

https://reviews.llvm.org/D102447 attempted to introduces libMutagen/libclang_rt.mutagen.a as a subset of libFuzzer/libclang_rt.fuzzer.a, and was landed as https://reviews.llvm.org/rGc4a41cd77c15c2905ac74beeec09f8343a65a549.

A bug involving uninitialized function pointers in two unit tests only surfaced on Darwin, leading it to be reverted in https://github.com/llvm/llvm-project/commit/fd0a2f75ff4f25a4759afeb72b42ba1b6ccea93f.

This patch is identical to the previous one, except that it zero-initializes the config struct and properly forwards the function pointers in MutagenInterface::SetUp in tests/MutagenUnittest.cpp.

Diff Detail

Event Timeline

aarongreen created this revision.May 27 2021, 7:13 AM
aarongreen requested review of this revision.May 27 2021, 7:13 AM

I have to hit pause on this. While the normal cmake approach passes, I just noticed the standalone approach to building the unit test doesn't.

Could we put this diff in the other review? It will be easier to see what's changed that way. (You might need to re-open that review to update the diff).

aarongreen edited the summary of this revision. (Show Details)

Added some feature macros to detect msan and include msan_interface properly for the standalone build.

aarongreen abandoned this revision.May 27 2021, 12:00 PM

Original revision reopened instead.

compiler-rt/lib/fuzzer/FuzzerDefs.h