Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

thumb libc SIGILL from __libc_mutex_unlock (Re: thumb compilation)


I'm running a current kernel (with kern_exec debugging and extra
logging) and matt-armv6 userspace since it has system call support for

When I run a statically and -mthumb compiled /bin/cat (including libc) I get
get s SIGILL, which I presume is the same one I get when whole userspace
is compiled with -mthumb (with a few -mthumb-interwork exceptions,
though) and /sbin/init dies with SIGSEG:

Program received signal SIGILL, Illegal instruction.
0x0001b330 in __libc_mutex_unlock ()
(gdb) bt
#0  0x0001b330 in __libc_mutex_unlock ()
#1  0x00011358 in __cxa_atexit ()
#2  0x000113c6 in atexit ()
#3  0x000081dc in ___start ()
#4  0x000080f8 in _init ()
#5  0x000080f8 in _init ()
Previous frame identical to this frame (corrupt stack?)

From what I can tell, __libc_mutex_unlock is actually
__libc_mutex_catchall_stub from lib/libc/thread-stub/thread-stub.c which
objdump -d shows as:

0001b328 <__libc_mutex_catchall_stub>:
   1b328:       b500            push    {lr}
   1b32a:       4b06            ldr     r3, [pc, #24]   
   1b32c:       681b            ldr     r3, [r3, #0]
   1b32e:       2b00            cmp     r3, #0
   1b330:       d004            beq     1b33c <__libc_mutex_catchall_stub+0x14>
   1b332:       fd93f7ff        bl      1ae5c <getpid>
   1b336:       2106            mov     r1, #6
   1b338:       fbfcf002        bl      1db34 <___kill_from_thumb>
   1b33c:       2000            mov     r0, #0
   1b33e:       bc02            pop     {r1}
   1b340:       4708            bx      r1
   1b342:       0000            lsl     r0, r0, #0
   1b344:       e620            b       1af88 <__sread+0x34>
   1b346:       0002            lsl     r2, r0, #0

Is there something wrong with the thread detection in
CHECK_NOT_THREADED_ALWAYS, or what's going on?


Home | Main Index | Thread Index | Old Index