Re: pgsql: Remove ill-considered suppression of gcc warnings in plperl, and

Lists: pgsql-bugspgsql-committers
From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove ill-considered suppression of gcc warnings in plperl, and
Date: 2004-11-17 21:23:37
Message-ID: 20041117212337.6833F3A3F50@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-committers

Log Message:
-----------
Remove ill-considered suppression of gcc warnings in plperl, and fix
some of the bugs exposed thereby. The remaining 'might be used uninitialized'
warnings look like live bugs, but I am not familiar enough with Perl/C hacking
to tell how to fix them.

Modified Files:
--------------
pgsql/src/pl/plperl:
GNUmakefile (r1.16 -> r1.17)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/GNUmakefile.diff?r1=1.16&r2=1.17)
plperl.c (r1.56 -> r1.57)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plperl.c.diff?r1=1.56&r2=1.57)


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tom Lane <tgl(at)svr1(dot)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Remove ill-considered suppression of gcc warnings in plperl, and
Date: 2004-11-18 00:49:06
Message-ID: 20041118004906.GB26441@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-committers

On Wed, Nov 17, 2004 at 09:23:37PM +0000, Tom Lane wrote:

> Remove ill-considered suppression of gcc warnings in plperl, and fix
> some of the bugs exposed thereby.

These changes may not have targeted the problem mentioned in the
"plperl crashes backend" thread in pgsql-bugs, but I'll report that
they didn't fix it. After rebuilding I can still reproduce the
crash.

http://archives.postgresql.org/pgsql-bugs/2004-11/msg00216.php

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: [COMMITTERS] pgsql: Remove ill-considered suppression of gcc warnings in plperl, and
Date: 2004-11-18 01:34:37
Message-ID: 10608.1100741677@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-committers

Michael Fuhr <mike(at)fuhr(dot)org> writes:
> On Wed, Nov 17, 2004 at 09:23:37PM +0000, Tom Lane wrote:
>> Remove ill-considered suppression of gcc warnings in plperl, and fix
>> some of the bugs exposed thereby.

> These changes may not have targeted the problem mentioned in the
> "plperl crashes backend" thread in pgsql-bugs, but I'll report that
> they didn't fix it.

Yeah, I know. I had just done that in the slight hope that more
warnings would pinpoint the error. They didn't, but I figured I'd
commit what I had anyway. I still think there are some broken
combinations exposed by the remaining warnings, but they are not
combinations exercised by the failing test case.

BTW, on my machine your test case does NOT fail if you declare the
function as plperlu instead of plperl. Same for you?

It's clearly a memory clobber problem; once I got this:

WARNING: problem in alloc set pg_depend_reference_index: req size > alloc size for chunk 0x94429d0 in block 0x94429c0
WARNING: problem in alloc set pg_depend_reference_index: bad single-chunk 0x94429d0 in block 0x94429c0
WARNING: problem in alloc set pg_depend_reference_index: bogus aset link in block 0x94429c0, chunk 0x94429d0
WARNING: problem in alloc set pg_depend_reference_index: found inconsistent memory block 0x94429c0
WARNING: problem in alloc set pg_depend_reference_index: found inconsistent memory block 0x94f6918

I have not been able to reproduce that, which is too bad because it
would've provided a place to set a debugger watchpoint and catch the
clobber in the act.

regards, tom lane


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Remove ill-considered suppression of gcc warnings in plperl, and
Date: 2004-11-18 02:08:27
Message-ID: 20041118020827.GA26705@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-committers

On Wed, Nov 17, 2004 at 08:34:37PM -0500, Tom Lane wrote:

> BTW, on my machine your test case does NOT fail if you declare the
> function as plperlu instead of plperl. Same for you?

Yep: with plperlu I don't get the crash, neither on FreeBSD nor on
Solaris, at least not for arrays with up to one million elements.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/