Skip to content

Commit 95141aa

Browse files
zxombieemaste
authored andcommitted
Fix TableLookupTest on FreeBSD
As with Linux placce the Counters array in the __libfuzzer_extra_counters section. This fixes the test on FreeBSD. Reviewed by: vitalybuka Differential Revision: https://reviews.llvm.org/D125902
1 parent 461dafd commit 95141aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/test/fuzzer/TableLookupTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const size_t N = 1 << 12;
2222
// Use either `Counters[Idx] = 1` or `Counters[Idx]++;`
2323
// depending on whether multiple occurrences of the event 'Idx'
2424
// is important to distinguish from one occurrence.
25-
#ifdef __linux__
25+
#if defined(__linux__) || defined(__FreeBSD__)
2626
__attribute__((section("__libfuzzer_extra_counters")))
2727
#endif
2828
#ifdef _WIN32

0 commit comments

Comments
 (0)