Re: Autovacuum worker does not set stack_base_ptr
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>, "Johann 'Myrkraverk' Oskarsson" <johann@2ndquadrant.com>
Date: 2012-04-03T02:57:19Z
Lists: pgsql-hackers
On Sun, Apr 1, 2012 at 12:31 PM, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote: > Currently, only regular backends set the stack base pointer, for the > check_stack_depth() mechanism, in PostgresMain. We don't have stack overrun > protection in auxiliary processes. However, autovacuum workers at least can > run arbitrary user code, and if that overruns the stack, you get a segfault. The *Main functions for the various auxiliary processes seem to have a bad case of cut-and-paste-itis. Consolidating some of that logic would help to avoid bugs of this type. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company