[Gc] gc: bug leads to segfault in prelinked binaries
hans_boehm at hp.com
Tue Feb 17 10:18:00 PST 2004
This is already in my tree, which should be available shortly. I was
convinced that the patch is indeed correct, though that wasn't originally
obvious to me either.
There is a longstanding discussion about __libc_stack_end. According to
glibc rules the collector should indeed not be using it. And it doesn't if
your version of libc doesn't export it. The problem is that all the
sanctioned alternatives are technically inferior, so the collector still
tries to use it first. It gets itself into trouble if it's there but contains
the wrong value, which is what happens with prelinked libraries. Fortunately,
the wrong value is always zero.
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com]On Behalf Of Moritz Barsnick
> Sent: Tuesday, February 17, 2004 12:43 AM
> To: GC List
> Subject: [Gc] gc: bug leads to segfault in prelinked binaries
> I'm a non-subscriber, but I hope you'll accept my report anyway.
> Recently, I discovered a segfault in my favorite web browser, w3m
> (https://w3m.sf.net/). This was on a relatively new Fedora Linux
> distribution (ex-RedHat, https://fedora.redhat.com/). I pretty quickly
> cornered it down to the new prelink mechanism, which is now enabled by
> default in Fedora, and I suppose many distributions will follow (check
> I reported this bug against Fedora in the RedHat bug tracking system
> under https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=115201 .
> There, the maintainer of the w3m package pointed out that
> this is a bug
> in gc. "It makes assumptions about __libc_stack_end which it certainly
> should not do."
> This bug is present both in 6.2 and in 6.3alpha4 (the newest I could
> find) and will be very critical for all apps which use gc on such
> prelink-aware systems.
> I've attached the patch provided by RedHat, and hope it is correct and
> is included soon. "It works for me." ;-)
> best regards,
More information about the Gc