This is an archive of the discontinued LLVM Phabricator instance.

[asan] Enable detect_stack_use_after_return=1 by default on Linux
ClosedPublic

Authored by vitalybuka on Apr 19 2022, 6:36 PM.

Details

Summary

By default -fsanitize=address already compiles with this check, why not use it.
For compatibly it can be disabled with env ASAN_OPTIONS=detect_stack_use_after_return=0.

Diff Detail

Event Timeline

vitalybuka created this revision.Apr 19 2022, 6:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2022, 6:36 PM
vitalybuka requested review of this revision.Apr 19 2022, 6:36 PM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptApr 19 2022, 6:36 PM
Herald added subscribers: llvm-commits, Restricted Project, cfe-commits. · View Herald Transcript
vitalybuka added a reviewer: Restricted Project.Apr 19 2022, 6:36 PM
vitalybuka edited the summary of this revision. (Show Details)
kda accepted this revision.Apr 20 2022, 2:34 PM
This revision is now accepted and ready to land.Apr 20 2022, 2:34 PM
eugenis accepted this revision.Apr 20 2022, 3:15 PM
This revision now requires review to proceed.Apr 20 2022, 3:17 PM
hans accepted this revision.Apr 21 2022, 4:11 AM

Sounds good to me.

Worth a release note maybe?

This revision is now accepted and ready to land.Apr 21 2022, 4:11 AM

add release note

vitalybuka added inline comments.Apr 21 2022, 2:15 PM
clang/docs/ReleaseNotes.rst
175 ↗(On Diff #424291)

@hans PTAL

175 ↗(On Diff #424291)

I'll move MSAN_OPTIONS into a separate patch if this format is OK

hans accepted this revision.Apr 22 2022, 4:50 AM
hans added inline comments.
clang/docs/ReleaseNotes.rst
175 ↗(On Diff #424291)

lgtm

This revision was landed with ongoing or failed builds.Apr 22 2022, 3:31 PM
This revision was automatically updated to reflect the committed changes.
vitalybuka reopened this revision.Apr 27 2022, 12:46 AM
This revision is now accepted and ready to land.Apr 27 2022, 12:46 AM
vitalybuka retitled this revision from [asan] Enable detect_stack_use_after_return=1 by default to [asan] Enable detect_stack_use_after_return=1 by default on Linux.Apr 28 2022, 7:19 PM
vitalybuka edited the summary of this revision. (Show Details)
This revision was landed with ongoing or failed builds.Apr 28 2022, 9:08 PM
This revision was automatically updated to reflect the committed changes.