Re: longjmp clobber warnings are utterly broken in modern gcc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: longjmp clobber warnings are utterly broken in modern gcc
Date: 2015-02-01 17:52:39
Message-ID: 29462.1422813159@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:
> On 02/01/2015 03:56 PM, Martijn van Oosterhout wrote:
>> If you want the compiler to catch this, I don't see any way without
>> requiring the code to indicate specifically which local variables it
>> intends to use, or not using the locals at all by using a seperate
>> cleanup function (as discussed elsewhere in this thread). With
>> information about the locals you might be able to conjure some GCC
>> macros to set things up to complain if you use anything else.

> I wonder how difficult it would be to teach e.g. clang static analyzer
> to catch this, rather than the compiler.

Maybe we could interest the Coverity crew in this topic. Seems like
the kind of thing they should care about.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2015-02-01 20:14:27 Re: Small doc patch about pg_service.conf
Previous Message Tom Lane 2015-02-01 17:50:28 Re: Re: [COMMITTERS] pgsql: Another attempt at fixing Windows Norwegian locale.