2009/6/18 Bojan Smojver <bojan@rexursive.com>
On Thu, 2009-06-18 at 03:12 +0200, Gavin Sherry wrote:
> It's a little late my time to decipher this.

I'll bet on of of the load/store thingies. Try with si/ni to determine
where exactly it dies. Yeah, I know - not much help :-(

Breakpoint 1, apr_proc_mutex_unix_setup_lock () at locks/unix/proc_mutex.c:174
174         proc_mutex_op_try.sem_num = 0;
1: x/i $pc  0x10005e4c <apr_proc_mutex_unix_setup_lock+4>:      lwz     r5,844(r2)
(gdb) si
176         proc_mutex_op_try.sem_flg = SEM_UNDO | IPC_NOWAIT;
1: x/i $pc  0x10005e50 <apr_proc_mutex_unix_setup_lock+8>:      li      r0,6144
(gdb)
177         proc_mutex_op_off.sem_num = 0;
1: x/i $pc  0x10005e54 <apr_proc_mutex_unix_setup_lock+12>:     lwz     r4,848(r2)
(gdb)
488         proc_mutex_lock_it.l_whence = SEEK_SET;   /* from current point */
1: x/i $pc  0x10005e58 <apr_proc_mutex_unix_setup_lock+16>:     lwz     r8,852(r2)
(gdb)
489         proc_mutex_lock_it.l_start = 0;           /* -"- */
1: x/i $pc  0x10005e5c <apr_proc_mutex_unix_setup_lock+20>:     li      r9,0
(gdb)
493         proc_mutex_unlock_it.l_whence = SEEK_SET; /* from current point */
1: x/i $pc  0x10005e60 <apr_proc_mutex_unix_setup_lock+24>:     lwz     r7,856(r2)
(gdb)
171         proc_mutex_op_on.sem_num = 0;
1: x/i $pc  0x10005e64 <apr_proc_mutex_unix_setup_lock+28>:     li      r10,0
(gdb)
0x10005e68      171         proc_mutex_op_on.sem_num = 0;
1: x/i $pc  0x10005e68 <apr_proc_mutex_unix_setup_lock+32>:     lwz     r6,840(r2)
(gdb)
172         proc_mutex_op_on.sem_op = -1;
1: x/i $pc  0x10005e6c <apr_proc_mutex_unix_setup_lock+36>:     li      r3,-1
(gdb)
173         proc_mutex_op_on.sem_flg = SEM_UNDO;
1: x/i $pc  0x10005e70 <apr_proc_mutex_unix_setup_lock+40>:     li      r11,4096
(gdb)
176         proc_mutex_op_try.sem_flg = SEM_UNDO | IPC_NOWAIT;
1: x/i $pc  0x10005e74 <apr_proc_mutex_unix_setup_lock+44>:     sth     r0,4(r5)

Program received signal SIGSEGV, Segmentation fault.
apr_proc_mutex_unix_setup_lock () at locks/unix/proc_mutex.c:176
176         proc_mutex_op_try.sem_flg = SEM_UNDO | IPC_NOWAIT;
1: x/i $pc  0x10005e74 <apr_proc_mutex_unix_setup_lock+44>:     sth     r0,4(r5)

Do, we're trying to store r0 (int 6144) at 4(r5) = 4 + 844(r2) above. Seems like this should all work fine... remarkably trivial stuff. I've even tried two different versions of GCC with the same result. :(

Thanks,
Gavin
 

--
Bojan