From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: compiler warning |
Date: | 2011-02-05 04:28:57 |
Message-ID: | 201102050428.p154Sv506247@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Magnus Hagander wrote:
> On Thu, Feb 3, 2011 at 04:40, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > I am seeing the following compiler warning for the past few days:
> >
> > ? ? ? ?basebackup.c:213: warning: variable `ptr' might be clobbered by
> > ? ? ? ?`longjmp' or `vfork'
> >
> > and I see this comment in the file:
> >
> > ? ? ? ?/*
> > ? ? ? ? * Actually do a base backup for the specified tablespaces.
> > ? ? ? ? *
> > ? ? ? ? * This is split out mainly to avoid complaints about "variable might be
> > ? ? ? ? * clobbered by longjmp" from stupider versions of gcc.
> > ? ? ? ? */
> >
> > Seems that isn't working as expected. ?I am using:
> >
> > ? ? ? ?gcc version 2.95.3 20010315 (release)
> >
> > with -O1.
>
> This is the same warning Tom fixed earlier. I have no idea what
> actually causes it :(
>
> I think it's somehow caused by the PG_ENSURE_ERROR_CLEANUP stuff.
> Does it go away if you break everything inside the if
> (opt->includewal) into it's own function? (Or at least everything
> except the pq_putemptymessage() call, because moving that would make
> the code very confusing)
I added the attached C comment so we know why the warning is generated.
We can remove it later if we want, but I want to have it if we get
reports about 9.1 problems.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachment | Content-Type | Size |
---|---|---|
/rtmp/clobber.diff | text/x-diff | 765 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2011-02-05 04:45:05 | Re: [HACKERS] Slow count(*) again... |
Previous Message | Joachim Wieland | 2011-02-05 03:50:16 | Re: pg_dump directory archive format / parallel pg_dump |