aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/example/ImageViewer.java
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-04-30 21:29:23 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-04-30 21:29:23 +0000
commitf6a3b87c7b5d870471c73ee47b494f8b32e2a3a4 (patch)
treebdd4712c37869213268a175b9919d0f3d6d49cda /src/interfaces/jdbc/example/ImageViewer.java
parente0095c6c42c97c46e49b747f8cf4ae97ceebfbfd (diff)
downloadpostgresql-f6a3b87c7b5d870471c73ee47b494f8b32e2a3a4.tar.gz
postgresql-f6a3b87c7b5d870471c73ee47b494f8b32e2a3a4.zip
Reset CurrentMemoryContext to TopMemoryContext at the beginning of error
cleanup, ie, as soon as we have caught the longjmp. This ensures that current context will be a valid context throughout error cleanup. Before it was possible that current context was pointing at a context that would get deleted during cleanup, leaving any subsequent pallocs in deep trouble. I was able to provoke an Assert failure when compiled with asserts + -DCLOBBER_FREED_MEMORY, if I did something that would cause an error to be reported by the backend large-object code, because indeed that code operates in a context that gets deleted partway through xact abort --- and CurrentMemoryContext was still pointing at it! Boo hiss.
Diffstat (limited to 'src/interfaces/jdbc/example/ImageViewer.java')
0 files changed, 0 insertions, 0 deletions