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

Bug#634261: [sparc] iceweasel: Bus Error in setbuf()



On Sat, Dec 22, 2012 at 01:38:44PM -0800, Jonathan Nieder wrote:
> (culling cc list)
> Hi Adrian,
> 
> John Paul Adrian Glaubitz wrote:
> 
> > [Subject: Debian #634261: Is it actually a(n RC) bug?]
> 
> Please keep in mind that these appear as emails in a crowded inbox, so
> the subject line can be a good place to put valuable context.

I actually thought the subject was quite reasonable ;). Anyway.
 
> > Mike Hommey wrote:
> 
> >> FYI, I found that it is triggered by the _IO_stdin_used symbol not
> >> being exported from the binary, which happened because of a version-script
> >> couple with -rdynamic. I still think there is something fishy going on
> >> on the libc6 side, but not as bad as originally thought.
> >
> > This seems to be a known and more or less documented behavior of libc
> > to determine which ABI to use for an application software, see [1].
> >
> > What eventually happens is an unaligned access due to the ABI
> > mismatch.
> 
> I don't completely follow, so I'll just ask: do you mean that this is
> a case of ABI misuse, with poor error reporting?

As far I understand the problem, the Mozilla developers provide a
version script to the linker to control which symbols get
exported. This helps speeding up the load process of the binary and
reduces the memory footprint.

What the Mozilla developers didn't seem to put into account is that if
you prevent the symbol _IO_stdin_used from being exported from your
binary, parts of the ABI of the standard C library will change and it
will behave like an older version which causes the unaligned access
which results in a CPU trap.

> Can you describe what iceweasel was doing wrong?  Is this documented
> so future coders know not to make the same mistake?  Is the version in
> squeeze affected?  How about the version in wheezy?

It seems to have been fixed in Firefox 10 which is part of Wheezy:

> (sid)glaubitz@smetana:~$ objdump -T /usr/lib/xulrunner-10.0/xulrunner-bin |grep IO
> 0001ceb8 g    DO .rodata	      00000004  Base _IO_stdin_used

But, as I said, I am not an expert on the internals of the C library,
so I am just speculating from the knowledge I gained from Michael (I
put him into CC again).

It might be worthful to check whether Mozilla made upstream changes in
this regard or whether there was an upstream bug report.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: