Volatile-ize some plperl variables that must survive into PG_CATCH blocks.

This appears to be necessary to fix a failure seen on buildfarm member
sittella.  It shouldn't be necessary according to the letter of the C
standard, because we don't change the values of these variables within
the PG_TRY blocks; but somehow gcc 4.7.2 is dropping the ball.

Discussion: https://postgr.es/m/17555.1485179975@sss.pgh.pa.us
This commit is contained in:
Tom Lane 2017-01-23 09:15:49 -05:00
parent 366d2a3d88
commit c0ef456b97

View File

@ -1763,8 +1763,8 @@ Datum
plperl_call_handler(PG_FUNCTION_ARGS)
{
Datum retval;
plperl_call_data *save_call_data = current_call_data;
plperl_interp_desc *oldinterp = plperl_active_interp;
plperl_call_data *volatile save_call_data = current_call_data;
plperl_interp_desc *volatile oldinterp = plperl_active_interp;
plperl_call_data this_call_data;
/* Initialize current-call status record */
@ -1813,8 +1813,8 @@ plperl_inline_handler(PG_FUNCTION_ARGS)
FunctionCallInfoData fake_fcinfo;
FmgrInfo flinfo;
plperl_proc_desc desc;
plperl_call_data *save_call_data = current_call_data;
plperl_interp_desc *oldinterp = plperl_active_interp;
plperl_call_data *volatile save_call_data = current_call_data;
plperl_interp_desc *volatile oldinterp = plperl_active_interp;
plperl_call_data this_call_data;
ErrorContextCallback pl_error_context;