Re: Preventing stack-overflow crashes (improving on max_expr_depth)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Preventing stack-overflow crashes (improving on max_expr_depth)
Date: 2003-12-31 16:20:49
Message-ID: 10734.1072887649@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gaetano Mendola <mendola(at)bigfoot(dot)com> writes:
> Is ABS enough on a 64-bit architecture ?

That was pseudocode, I wasn't actually planning to rely on a function.
Something more like

long diff;

diff = stack_base_ptr - &stack_top_loc;
if (diff < 0)
diff = -diff;
if (diff > max)
elog ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ivan 2003-12-31 16:22:57 Re: cache in plpgsql
Previous Message Tom Lane 2003-12-31 16:16:48 Re: Is my MySQL Gaining ?