Re: Backend often crashing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Guido Notari" <gnotari(at)linkgroup(dot)it>
Cc: "Postgresql General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Backend often crashing
Date: 2003-04-02 20:59:36
Message-ID: 23048.1049317176@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Guido Notari" <gnotari(at)linkgroup(dot)it> writes:
> I replaced the occurences of to_ascii with a custum function that calls
> to_ascii only on the result of a translate, which in turn converts some
> strange (russian?) characters to plain ascii.

Ooohhh ... looking at the source code shows that to_ascii processes one
byte too many, which would lead to clobbering the next byte of memory,
which would quite possibly cause your problem.

In 7.2.4, the bug is at line 114 of src/backend/utils/adt/ascii.c:

for (x = src; x <= src_end; x++)

should be

for (x = src; x < src_end; x++)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-04-02 21:16:55 Re: Joins and their efficiencies
Previous Message Dennis Gearon 2003-04-02 20:55:46 Re: this date format thing.