[Aboriginal] Merry christmas, I have found two bugs

Rob Landley rob at landley.net
Wed Dec 26 15:50:01 PST 2012


On 12/26/2012 04:23:06 PM, Bjørn Forsman wrote:
> On 26 December 2012 22:36, Rob Landley <rob at landley.net> wrote:
> > Very wierd. Lemme see if I can reproduce that... yes I can. And  
> wow, you're
> > right, it's only happening for dev-environment.sh which should be  
> TOTALLY
> > unrelated...
> >
> >   wget http://landley.net/aboriginal/strace-armv5l
> 
> That returns 404 error code for me (but ignore that).

Sorry, http://landley.net/aboriginal/bin/strace-armv5l (typed by hand,  
got it wrong).

> >   chmod +x strace-armv5l
> >   ./strace /bin/ls
> >
> > execve("/bin/ls", ["/bin/ls"], [/* 9 vars */]) = 0
> > brk(0)                                  = 0x932000
> > brk(0x9324b0)                           = 0x9324b0
> > set_tls(0x932490, 0x5124c, 0, 0x1, 0x65fac) = 0
> > ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or  
> TCGETS,
> > {B38400 opost isig icanon echo ...}) = 0
> > ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or  
> TCGETS,
> > {B38400 opost isig icanon echo ...}) = 0
> > getuid32()                              = 0
> > geteuid32()                             = 0
> > brk(0x9334b0)                           = 0x9334b0
> > brk(0x934000)                           = 0x934000
> > umask(0)                                = 022
> > umask(022)                              = 0
> > ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or  
> TCGETS,
> > {B38400 opost isig icanon echo ...}) = 0
> > ioctl(0, TIOCGWINSZ, {ws_row=0, ws_col=0, ws_xpixel=0,  
> ws_ypixel=0}) = 0
> > ioctl(1, TIOCGWINSZ, {ws_row=0, ws_col=0, ws_xpixel=0,  
> ws_ypixel=0}) = 0
> > ioctl(2, TIOCGWINSZ, {ws_row=0, ws_col=0, ws_xpixel=0,  
> ws_ypixel=0}) = 0
> > newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0755, st_size=1024,  
> ...}, 0) = 0
> > open(".", O_RDONLY|O_LARGEFILE)         = 3
> > dup(3)                                  = 4
> > fstat64(4, {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> > fcntl64(4, F_GETFL)                     = 0x20000 (flags
> > O_RDONLY|O_LARGEFILE)
> > getdents64(4, /* 4 entries */, 1024)    = 120
> > newfstatat(4, ".", {st_mode=S_IFDIR|0755, st_size=1024, ...},
> > AT_SYMLINK_NOFOLLOW) = 0
> > newfstatat(4, "strace-armv5l", {st_mode=S_IFREG|0755,  
> st_size=329448, ...},
> > AT_SYMLINK_NOFOLLOW) = 0
> > newfstatat(4, "..", {st_mode=S_IFDIR|0755, st_size=163, ...},
> > AT_SYMLINK_NOFOLLOW) = 0
> > newfstatat(4, "lost+found", {st_mode=S_IFDIR|0700, st_size=12288,  
> ...},
> > AT_SYMLINK_NOFOLLOW) = 0
> > getdents64(4, /* 0 entries */, 1024)    = 0
> > close(4)                                = 0
> > gettid()                                = 49
> > tgkill(49, 49, SIGFPE)                  = 0
> > --- SIGFPE {si_signo=SIGFPE, si_code=SI_TKILL, si_pid=49, si_uid=0}  
> ---
> > +++ killed by SIGFPE +++
> > Floating point exception
> >
> > So it's getting a ways into ls. Looks like it manages the whole  
> dirtree and
> > then dies on the way back. Hmmm...
> >
> > Thanks for the heads up, I'm going to chew on these for a bit...
> 
> Cool. And thanks for the very quick response!

Coincidence I happened to be reading at the time. My email sometimes  
has a day or two of latency before I catch up. Too many mailing lists,  
plus twitter, plus other things competing for time.

> I tried building toybox for my development host. No problem with "ls"  
> there.

Yeah, it works fine on i686. I'm poking at the other problem first  
though.

> Now when I get toybox rebuilt with debug symbols I can figure out
> (from the core file) where the bug is. Could it be some wrapping of
> integer types on arm (that do not happen in x86) that cause division
> by zero?! I'm curious....

Obviously I screwed something up. I'll post when I find it. Real life  
still intruding a bit. :)

Rob
 1356565801.0


More information about the Aboriginal mailing list