[SERVER-31397] Add 'handle_segv=0' to ASAN_OPTIONS Created: 04/Oct/17  Updated: 30/Oct/23  Resolved: 13/Nov/17

Status: Closed
Project: Core Server
Component/s: Build, Diagnostics, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.6.0-rc4

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: Spencer Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
causes SERVER-36844 ASAN build hooks disable stack traces Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2017-10-23, Platforms 2017-11-13
Participants:
Linked BF Score: 0

 Description   

ASAN tries to handle segfaults. When coredumps are disabled, this is fine. However, as we have enabled coredumps on ASAN builds, this results in the backtraces in the core getting clobbered by ASAN. Adding the flag in the title of this issue may get ASAN to produce better cores on segfault.



 Comments   
Comment by Githook User [ 13/Nov/17 ]

Author:

{'name': 'Spencer Jackson', 'username': 'spencerjackson', 'email': 'spencer.jackson@mongodb.com'}

Message: SERVER-31397: Add 'handle_segv=0' to ASAN_OPTIONS
Branch: master
https://github.com/mongodb/mongo/commit/b07fbb7bd7d83830c313de245863b9a4f0e8700e

Comment by Spencer Jackson [ 10/Oct/17 ]

An extra wrinkle to this: It appears that new versions of clang, 5.0 included, default to allowing applications which set signal handlers to override the ASAN handler. The version of clang in our toolchain does not, and requires handle_segv=0 in order to allow the application handler to run.

Generated at Thu Feb 08 04:26:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.