#27273: ASan fails to link on Travis due to rustc and linker arguments --------------------------------------+-------------------- Reporter: alexcrichton | Owner: (none) Type: defect | Status: new Priority: Medium | Milestone: Component: - Select a component | Version: Severity: Normal | Keywords: Actual Points: | Parent ID: Points: | Reviewer: Sponsor: | --------------------------------------+-------------------- In helping to debug https://trac.torproject.org/projects/tor/ticket/25386 I've found that a number of the link errors are attributable to the linker invocation on Travis. The recent `link_rust.sh` script is definitely necessary I think, except that I believe it needs a few tweaks:
* The `-lasan` argument should be replaced with `-fsanitizer=address` I believe to ensure that the C compiler links all of its relevant libraries (as they may have different names and different numbers of libs on some platforms I think). * Second, the Rust compiler by default passes `-nodefaultlibs` to the linker which means that the linker script also passes this along. It looks, however, like this is incompatible with `-fsanitizer=address`, causing link errors. This argument should be safe to strip out though. The first bullet was easy enough to fix locally and the second bullet was fixable by changing `link_rust.sh` to a `bash` script and then using something like: {{{ linker_args="$@" $CCLD @RUST_LINKER_OPTIONS@ ${linker_args//-nodefaultlibs/} }}} -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27273> Tor Bug Tracker & Wiki <https://trac.torproject.org/> The Tor Project: anonymity online
_______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs