[SERVER-42263] Fuzzer targets are declared but not buildable with GCC Created: 17/Jul/19  Updated: 29/Oct/23  Resolved: 26/Jul/19

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Bug Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Jonathan Reams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 2019-07-29
Participants:

 Description   

$ time python3 buildscripts/scons.py --implicit-cache --build-fast-and-loose=on --dbg=on --opt=on --variables-files="/home/andrew/.scons/site_scons/mongo_custom_variables.py etc/scons/mongodbtoolchain_stable_gcc.vars" --link-model=dynamic --install-mode=hygienic --allocator=system -j300 --use-libunwind -j300 install-all-meta -k
...
Linking build/optdebug/mongo/bson/bson_validate_fuzzer
g++: error: unrecognized argument to -fsanitize= option: 'fuzzer'
Linking build/optdebug/mongo/util/net/asn1_parser_fuzzer
g++: error: unrecognized argument to -fsanitize= option: 'fuzzer'
Linking build/optdebug/mongo/db/op_msg_fuzzer
g++: error: unrecognized argument to -fsanitize= option: 'fuzzer'
scons: *** [build/optdebug/mongo/bson/bson_validate_fuzzer] Error 1
scons: *** [build/optdebug/mongo/util/net/asn1_parser_fuzzer] Error 1
scons: *** [build/optdebug/mongo/db/op_msg_fuzzer] Error 1
scons: done building targets (errors occurred during build).
build/optdebug/mongo/bson/bson_validate_fuzzer failed: Error 1
build/optdebug/mongo/util/net/asn1_parser_fuzzer failed: Error 1
build/optdebug/mongo/db/op_msg_fuzzer failed: Error 1

We should add a probe to ensure that the current toolchain supports -fsanitize=fuzzer, and, if not, we shouldn't declare the fuzzing targets.



 Comments   
Comment by Githook User [ 26/Jul/19 ]

Author:

{'name': 'Jonathan Reams', 'username': 'jbreams', 'email': 'jbreams@mongodb.com'}

Message: SERVER-42263 Only enable fuzzing tests if libfuzzer is supported by the compiler
Branch: master
https://github.com/mongodb/mongo/commit/0f996060bda135c287ba6ecfeb386cec1f1ca5e4

Comment by Andrew Morrow (Inactive) [ 24/Jul/19 ]

spencer.jackson - Can we schedule this into a sprint and assign it out? It is going to be a problem for hygienic which we are hoping to start using in evergreen for the dist target in the near future.

Generated at Thu Feb 08 05:00:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.