HomePhabricator

[ubsan] Add preinit initializer for ubsan

Description

[ubsan] Add preinit initializer for ubsan

Summary:
Now that ubsan does function interception (for signals), we
need to ensure that ubsan is initialized before any library
constructors are called. Otherwise, if a constructor calls
sigaction, ubsan will intercept in an unitialized state, which
will cause a crash.

This patch is a partial revert of r317757, which removed
preinit arrays for ubsan.

Reviewers: vitalybuka, eugenis, pcc

Subscribers: kubamracek, mgorny, llvm-commits, #sanitizers

Differential Revision: https://reviews.llvm.org/D42389

Details

Committed
fjricciJan 23 2018, 11:54 AM
Differential Revision
D42389: [ubsan] Add preinit initializer for ubsan
Branches
Unknown
Tags
Unknown