Re: Trigger causes the server to crash with SEGV - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Trigger causes the server to crash with SEGV
Date
Msg-id 8203.991428980@sss.pgh.pa.us
Whole thread Raw
In response to Re: Trigger causes the server to crash with SEGV  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I wrote:
> I tried it here.  I don't get a crash; I get a rather long delay and
> then
> psql:vlad.sql:61: ERROR:  Memory exhausted in AllocSetContextCreate(8192)

Some experimentation with other infinitely-recursive plpgsql functions
soon turned up a crash, however: spi.c was being sloppy about not
checking for a failure return from malloc().  I have repaired that,
as well as some other similar omissions elsewhere in the backend.
I can't be sure if that's the case that was biting you, however.

Someday we ought to mount a concerted effort to get rid of all direct
uses of malloc() and friends in the backend; they're too easy to misuse,
and there's no good reason not to funnel everything through palloc.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Trigger causes the server to crash with SEGV
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: plpython: sys module doesn't know about _getframe