Project

General

Profile

Actions

Bug #770

open

tests/device/crazy_linker failed

Added by Dmitry M. over 9 years ago. Updated over 8 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
12/23/2014
Due date:
% Done:

0%

Estimated time:
CPU Architecture:
Host OS:
Toolchain:
Android version:
CrystaX NDK Version:

Description

*** TESTS [gcc4.9]: 5 of 16 FAILED
[armeabi-v7a] tests/device/crazy_linker (test_dl_wrappers)
[armeabi-v7a] tests/device/crazy_linker (test_load_library)
[armeabi-v7a] tests/device/crazy_linker (test_load_library_callbacks)
[armeabi-v7a] tests/device/crazy_linker (test_load_library_depends)
[armeabi-v7a] tests/device/crazy_linker (test_two_shared_relros)

Please note the only failed sub-tests are those which load dynamically another shared library. Here is call stack from one of such crash:

F/libc (22596): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x1c in tid 22596 (test_dl_wrapper)
I/DEBUG ( 1511): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1511): Build fingerprint: 'google/hammerhead/hammerhead:5.0.1/LRX22C/1602158:user/release-keys'
I/DEBUG ( 1511): Revision: '11'
I/DEBUG ( 1511): ABI: 'arm'
I/DEBUG ( 1511): pid: 22596, tid: 22596, name: test_dl_wrapper >>> ./test_dl_wrappers <<<
I/DEBUG ( 1511): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1c
I/DEBUG ( 1511): r0 0000001c r1 b6dd6cb8 r2 42206d6f r3 bef9ba24
I/DEBUG ( 1511): r4 0000001c r5 b6ddad4c r6 b6b2b140 r7 b6f42955
I/DEBUG ( 1511): r8 00000000 r9 00000000 sl 00000000 fp bef9ba9c
I/DEBUG ( 1511): ip b6f1c68c sp bef9ba08 lr b6ee662d pc b6ecadb6 cpsr 000f0030
I/DEBUG ( 1511):
I/DEBUG ( 1511): backtrace:
I/DEBUG ( 1511): #00 pc 00016db6 /system/lib/libc.so (pthread_mutex_lock+7)
I/DEBUG ( 1511): #01 pc 00032629 /system/lib/libc.so (fputs+26)
I/DEBUG ( 1511): #02 pc 00000d13 /data/local/tmp/ndk-tests/libbar.so

The same picture for other sub-tests. It's easy to see libbar.so call 'fputs' from libc.so instead of libcrystax.so, even though libbar.so was linked with -lcrystax before -lc. This looks like bug in crazy_linker which don't take care about order of symbols when resolving them on library load.

Actions

Also available in: Atom PDF