This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Make insertion of version mismatch guard configurable
ClosedPublic

Authored by yln on Aug 27 2019, 12:52 PM.

Details

Summary

By default ASan calls a versioned function
__asan_version_mismatch_check_vXXX to ensure that the compiler ABI
version and runtime ABI version are compatible. This ensures that we get
a predictable linker error instead of hard-to-debug runtime errors.

Sometimes, however, we want to skip this safety guard. This new command
line option allows us to do just that.

rdar://47891956

Diff Detail

Repository
rL LLVM

Event Timeline

yln created this revision.Aug 27 2019, 12:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2019, 12:52 PM
kubamracek accepted this revision.Aug 27 2019, 4:01 PM
This revision is now accepted and ready to land.Aug 27 2019, 4:01 PM
yln added a comment.EditedAug 28 2019, 1:27 PM

Filipe Cabecinhas <filcab+llvm.phabricator@gmail.com>
when might we not want this?

It's useful when partially transitioning a project to a new compiler version or for testing the compiler itself around the time when the version bump is actually done. Sometimes we want to test with a version-bumped compiler with the the non-version-bumped runtime or vice versa.

The flag is not meant to be used by "normal" end users. It's hidden, and we don't change the default.

This revision was automatically updated to reflect the committed changes.