Re: codlin_month is up and complain - PL/Python crash - Mailing list pgsql-hackers

From Zdenek Kotala
Subject Re: codlin_month is up and complain - PL/Python crash
Date
Msg-id 4B7D0141.2040401@sun.com
Whole thread Raw
In response to Re: codlin_month is up and complain - PL/Python crash  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: codlin_month is up and complain - PL/Python crash
List 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


pgsql-hackers by date:

Previous
From: Richard Huxton
Date:
Subject: Re: PostgreSQL::PLPerl::Call - Simple interface for calling SQL functions from PostgreSQL PL/Perl
Next
From: Tim Bunce
Date:
Subject: Re: PostgreSQL::PLPerl::Call - Simple interface for calling SQL functions from PostgreSQL PL/Perl