This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fwd: [PATCH] tdestroy() should allow passing 'NULL' for 'freefct' callback
- From: Rich Felker <dalias at aerifal dot cx>
- To: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>
- Cc: Carlos O'Donell <carlos at redhat dot com>, Roland McGrath <roland at hack dot frob dot com>, OndÅej BÃlka <neleai at seznam dot cz>, Ivo Raisr <ivosh at ivosh dot net>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 26 Jun 2013 10:10:44 -0400
- Subject: Re: Fwd: [PATCH] tdestroy() should allow passing 'NULL' for 'freefct' callback
- References: <CANXv6=sw64PRodqTgArqUHQLTcQd8eEE_==6QHVHgLn52jh=1Q at mail dot gmail dot com> <20130611081615 dot GA6224 at domone dot kolej dot mff dot cuni dot cz> <CANXv6=vaJwfOKGgNWU55j-xdB5zqhp5_-3tdjS287+UR1r-nDA at mail dot gmail dot com> <CANXv6=sKC3wsF5ZN9So9Pq=BAfcwvveNZHaSvWEZL5KceH+goQ at mail dot gmail dot com> <20130625213231 dot E552A2C08A at topped-with-meat dot com> <51CAD729 dot 1080205 at redhat dot com> <CAAHN_R1sANKmuL_QW=-5KFp=BifOUeVS=coALM=sRT-hq3tapQ at mail dot gmail dot com>
On Wed, Jun 26, 2013 at 05:37:48PM +0530, Siddhesh Poyarekar wrote:
> On 26 June 2013 17:27, Carlos O'Donell <carlos@redhat.com> wrote:
> > Versioning is an interesting point I hadn't considered. In the past I'd
> > say we haven't always done this kind of bumping of the symbol version
> > to ensure considerate error messages. Though I agree with you, bumping
> > the symbol version is the right thing to do here.
>
> Why do we need a new symbol version for this? The new behaviour is
> backward compatible, so the only thing it adds is the ability to pass
> a NULL callback to tdestroy, which would result in a segfault earlier.
> I doubt if any application does something as silly as passing a NULL
> callback to catch the crash in a SIGSEGV handler to do something
> special.
Any program using the new feature of passing NULL would crash with old
glibc versions. A new symbol version forces it to instead report an
error that a newer glibc is required to run the program.
Rich