FS#56023 - [clang] -fsanitize=fuzzer doesn't work with 5.0

Attached to Project: Arch Linux
Opened by Frederik Deweerdt (fdeweerdt) - Tuesday, 17 October 2017, 16:18 GMT
Last edited by Evangelos Foutras (foutrelis) - Monday, 19 March 2018, 22:45 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

Since clang 5.0 the compile has gained a new flag: `-fsanitize=fuzzer`, this does however rely on libLLVMFuzzer.a being present, and that library isn't shipped with the llvm package. Please note that this is related to  FS#47389  , but i figured that since the library is needed by the new compiler flag it was worth re-opening a bug.

Additional info:
* package version(s)

llvm and clang 5.0.0-1

* config and/or log files etc.


Steps to reproduce:

$ cat fuzzer.cc
#include <stdint.h>
#include <sys/types.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
return 0;
}
$ clang -fsanitize-coverage=trace-pc-guard -fsanitize=fuzzer,address fuzzer.cc
/usr/bin/ld: cannot find /usr/lib/libLLVMFuzzer.a: No such file or directory
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)

This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Monday, 19 March 2018, 22:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  clang 6.0.0-1 + compiler-rt 6.0.0-1

Loading...