-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r17 standalone toolchain's -static-libstdc++ flag links arm32 libdl statically (breaks ASAN, dlopen) #692
Comments
more useful as an internal bug so you can assign it to eugenis? |
@eugenis might be assignable here too. If not, add him to the org. |
(he might prefer a buganizer bug anyway since that's probably his usual workflow) |
Here is fine. ASan never supported api 16: https://github.com/google/sanitizers/wiki/AddressSanitizerOnAndroid I'll take a look at the problem on api 26 device. |
Yeah, the reason for the |
We support at least L.
…On Mon, May 14, 2018 at 3:05 PM, Dan Albert ***@***.***> wrote:
Yeah, the reason for the __register_atfork failure is because the
sanitizer libs are built against a more recent API level. Although that
function was actually added in M, so maybe the minimum supported version
for ASAN has moved up?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#692 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZuShZkfruvVVZMCv5iBlctHsM1rcK2ks5tyf_HgaJpZM4T6uaj>
.
|
The asan runtime agrees: $ ./parse_elfnote.py ~/src/android-ndk-r17/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/6.0.2/lib/linux/libclang_rt.asan-arm-android.so
----------ABI INFO----------
ABI_ANDROID_API: 14
ABI_NDK_VERSION: r16b
ABI_NDK_BUILD_NUMBER: 4479499 @rprichard: not sure how you got that error, but it may be worth investigating, as it hints that it was built for M+. |
I tried my test case again, and I don't see the |
From r16b to r17, we started including Clang passes these arguments to the linker: The linker then pulls in libdl functions from
The dl* functions are also exported if I build a shared object using the standalone toolchain. I think the libdl APIs are broken in this configuration:
Test case: dltest.cpp:
Output:
The pointer should be non-NULL, and it is with NDK r16b. IIRC, arm32's libunwind needs libdl, so that's why we're specifying it, but the driver includes libdl automatically, so maybe we could omit it. |
The |
This error seems to happen in a very specific situation:
test.cpp:
Commands:
Output from adb:
Edit: It doesn't work on device API 16, but the error there is different:
The text was updated successfully, but these errors were encountered: