Page MenuHomePhabricator

Fixes `--enable-asan` compilation in MacOS
ClosedPublic

Authored by matiu on May 9 2018, 20:10.

Details

Summary

This fixes --enable-asan linkage for MacOS.

--fsanitize=address is not passed by default by libtool when linking libbitcoinconsesus, probably because of https://www.gnu.org/software/libtool/manual/html_node/Stripped-link-flags.html

By simply adding the flag in LIBTOOL_APP_LDFLAGS, the option is pass, and the library created successfully.

For Address sanitation, it is necesary to disable assembly (--disable-asm) in MacOS, the llvm compiler doesnt seem to understand the inline asm format with using --enable-asan, not sure why.

Test Plan

./configure --enable-asan --disable-asm && make && ./src/test/test_bitcoin

Diff Detail

Repository
rABC Bitcoin ABC
Branch
asan
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2567
Build 3251: Bitcoin ABC Buildbot (legacy)
Build 3250: arc lint + arc unit

Event Timeline

Are we doing anything about these builds under cmake?

deadalnix added inline comments.
configure.ac
242

This doesn't seems like the right place to add this.

253

Here seems more appropriate.

More LIBTOOL_APP_LDFLAGS config to a more appropiate place

This revision is now accepted and ready to land.May 11 2018, 22:35
This revision was automatically updated to reflect the committed changes.