[SERVER-18998] UnboundLocalError when building with --sanitize=thread and without --llvm-symbolizer Created: 16/Jun/15  Updated: 05/Feb/16  Resolved: 16/Jun/15

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 3.1.4
Fix Version/s: 3.1.5

Type: Bug Priority: Minor - P4
Reporter: Kamran K. Assignee: Kamran K.
Resolution: Done Votes: 0
Labels: 32qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 5 06/26/16
Participants:

 Description   

If you fail to specify a --llvm-symbolizer value when building with --sanitize=thread, you'll get an UnboundLocalError:

scons VARIANT_DIR=thread CC=`which clang-3.6` CXX=`which clang++-3.6` --sanitize=thread -j7 --allocator=system --opt=off core
...
 
UnboundLocalError: local variable 'tsan_options' referenced before assignment:
  File "/home/s/code/mongo/mongo/SConstruct", line 2202:
    env = doConfigure( env )
  File "/home/s/code/mongo/mongo/SConstruct", line 1828:
    tsan_options += "suppressions=\"%s\" " % myenv.File("#etc/tsan.suppressions").abspath



 Comments   
Comment by Githook User [ 16/Jun/15 ]

Author:

{u'username': u'kkmongo', u'name': u'Kamran Khan', u'email': u'kamran.khan@mongodb.com'}

Message: SERVER-18998 Fix a build failure when building TSan support without a symbolizer

Previously, the build would fail with an UnboundLocalError when appending to
tsan_options.
Branch: master
https://github.com/mongodb/mongo/commit/dd72c45ad1e2f5aaae33aca85b31698ece88c1d2

Generated at Thu Feb 08 03:49:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.