On Sun, Jun 17, 2012 at 09:58:46PM +0000, Thorsten Glaser wrote:
>Steve McIntyre dixit:
>
>>Digging further with the built-in debug TRACE function, I can see
>>problems in usr/dash/eval.c:evalcommand(). The place where cmd
>>switches from non-NULL to NULL is
>>
>>  status = redirectsafe(cmd->ncmd.redirect, REDIR_PUSH|REDIR_SAVEFD2);
>
>Yeah, I got approximately so far too, with gdb (despite my
>extremely limited gdb-fu).
>
>>Interestingly, adding more TRACE() calls makes the problem go
>>away. \o/ Classic Heisenbug behaviour.
>
>Right. Interestingly it’s always the shells you notice this in.
>Last time I saw this, it was a problem having to do with argument
>passing (registers vs. stack, how many, which, and where), including
>return value placement. But I’m out of guesses.

More debugging results:

 * If I replace -Os with -O0 to disable optimisation, the crash goes
   away too. Suggests (maybe) a compiler bug here...

 * There's a real bug in the ARM assembly version of longjmp in
   usr/klibc/arch/arm/setjmp.S: it will always pass back its first
   argument as a return value, even if it's 0 (see the man page for
   more details). Oddly, the Thumb implementation in the same file
   *is* correct!

-- 
Steve McIntyre, Cambridge, UK.                                st...@einval.com
We don't need no education.
We don't need no thought control.




-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to