Re: codlin_month is up and complain - PL/Python crash

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: codlin_month is up and complain - PL/Python crash
Date: 2010-02-18 08:58:41
Message-ID: 4B7D0141.2040401@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dne 17.02.10 18:39, Peter Eisentraut napsal(a):
> On ons, 2010-02-17 at 11:26 -0500, Tom Lane wrote:
>> But the behavior gcc appears to exhibit is that it won't warn about
>> variables that are only assigned once before the PG_TRY is entered,
>> and that seems reasonable to me since such a variable ought to have
>> the correct value either way.
>
> FWIW, this is a Sun Studio build that is complaining here.
>

Yes It is SS12. I add volatile keyword and problem disappears. The code
difference is following:

< PLy_spi_execute+0x742: 83 ec 0c subl $0xc,%esp
< PLy_spi_execute+0x745: ff b5 b8 f9 ff ff pushl 0xfffff9b8(%ebp)
< PLy_spi_execute+0x74b: e8 fc ff ff ff call MemoryContextSwitch

> PLy_spi_execute+0x742: 8b 85 cc f9 ff ff movl
0xfffff9cc(%ebp),%eax
> PLy_spi_execute+0x748: 83 ec 0c subl $0xc,%esp
> PLy_spi_execute+0x74b: 50 pushl %eax
> PLy_spi_execute+0x74c: e8 fc ff ff ff call MemoryContextSwitch

Good to mention that SS inline PLy_spi_execute_query inside
PLy_spi_execute(), because it is only one caller.

Zdenek

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tim Bunce 2010-02-18 09:35:16 Re: PostgreSQL::PLPerl::Call - Simple interface for calling SQL functions from PostgreSQL PL/Perl
Previous Message Richard Huxton 2010-02-18 08:26:51 Re: PostgreSQL::PLPerl::Call - Simple interface for calling SQL functions from PostgreSQL PL/Perl