Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix missing "volatile" in PLy_output().
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 11 Apr 2016 15:49:48 +0000 (11:49 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 11 Apr 2016 15:49:54 +0000 (11:49 -0400)
Commit 5c3c3cd0a3046339 plastered "volatile" on a bunch of variables
in PLy_output(), but removed the one that actually mattered, ie the
one on "oldcontext".  This allows some versions of clang to generate
code in which "oldcontext" has been trashed when control reaches the
PG_CATCH block.  Per buildfarm member tick.

src/pl/plpython/plpy_plpymodule.c

index 16d508943f04c1527b8ae1d8d7de519d2381d9db..e3322d12badadc44ad1df9470835f93e6ec98292 100644 (file)
@@ -404,7 +404,7 @@ PLy_output(volatile int level, PyObject *self, PyObject *args, PyObject *kw)
    char *volatile datatype = NULL;
    char *volatile table = NULL;
    char *volatile schema = NULL;
-   MemoryContext oldcontext ;
+   volatile MemoryContext oldcontext;
    PyObject *key, *value;
    PyObject *volatile so;
    Py_ssize_t pos = 0;