You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compiling TSan followed by ASan (or the other way around) in release mode creates linker error, need to wipe the build directory to make it work. (doing the same without the -c release -Xswiftc -enable-testing works fine)
repro
(needs Swift 4.2 pre-releases)
ASan then TSan
git clone https://github.com/apple/swift-nio.git
cd swift-nio
swift build --build-tests --sanitize=address -c release -Xswiftc -enable-testing
# observe how this works
swift build --build-tests --sanitize=thread -c release -Xswiftc -enable-testing
expected
works fine
actual
gives the following errors
Compile Swift Module 'NIOTests' (74 sources)
Linking ./.build/x86_64-apple-macosx10.10/release/NIOEchoServer
Undefined symbols for architecture x86_64:
"___asan_init", referenced from:
_asan.module_ctor in FileDescriptor.swift.o
_asan.module_ctor in Linux.swift.o
_asan.module_ctor in LinuxCPUSet.swift.o
_asan.module_ctor in Resolver.swift.o
_asan.module_ctor in Selectable.swift.o
"___asan_register_globals", referenced from:
_asan.module_ctor in FileDescriptor.swift.o
_asan.module_ctor in Resolver.swift.o
_asan.module_ctor in Selectable.swift.o
"___asan_unregister_globals", referenced from:
_asan.module_dtor in FileDescriptor.swift.o
_asan.module_dtor in Resolver.swift.o
_asan.module_dtor in Selectable.swift.o
"___asan_version_mismatch_check_apple_1000", referenced from:
_asan.module_ctor in FileDescriptor.swift.o
_asan.module_ctor in Linux.swift.o
_asan.module_ctor in LinuxCPUSet.swift.o
_asan.module_ctor in Resolver.swift.o
_asan.module_ctor in Selectable.swift.o
ld: symbol(s) not found for architecture x86_64
TSan then ASan
git clone https://github.com/apple/swift-nio.git
cd swift-nio
swift build --build-tests --sanitize=thread -c release -Xswiftc -enable-testing
# observe how this works
swift build --build-tests --sanitize=address -c release -Xswiftc -enable-testing
expected
works
actual
Compile Swift Module 'NIOTests' (74 sources)
Linking ./.build/x86_64-apple-macosx10.10/release/NIOEchoServer
Undefined symbols for architecture x86_64:
"___tsan_init", referenced from:
_tsan.module_ctor in FileDescriptor.swift.o
_tsan.module_ctor in Linux.swift.o
_tsan.module_ctor in LinuxCPUSet.swift.o
_tsan.module_ctor in Resolver.swift.o
_tsan.module_ctor in Selectable.swift.o
ld: symbol(s) not found for architecture x86_64
error: terminated(1): /Applications/Xcode-new.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/johannes/devel/swift-nio/.build/release.yaml test output:
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 088db93625cb8635917cd370896fe0ea
Issue Description:
description
compiling TSan followed by ASan (or the other way around) in release mode creates linker error, need to wipe the build directory to make it work. (doing the same without the
-c release -Xswiftc -enable-testing
works fine)repro
(needs Swift 4.2 pre-releases)
ASan then TSan
expected
works fine
actual
gives the following errors
TSan then ASan
expected
works
actual
The text was updated successfully, but these errors were encountered: