Re: Regex with > 32k different chars causes a backend crash - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Regex with > 32k different chars causes a backend crash
Date
Msg-id 515DAFF9.2060505@vmware.com
Whole thread Raw
In response to Re: Regex with > 32k different chars causes a backend crash  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
On 04.04.2013 03:32, Noah Misch wrote:
> On Wed, Apr 03, 2013 at 08:09:15PM +0300, Heikki Linnakangas wrote:
>> --- a/src/include/regex/regguts.h
>> +++ b/src/include/regex/regguts.h
>> @@ -148,6 +148,7 @@
>>   typedef short color;            /* colors of characters */
>>   typedef int pcolor;                /* what color promotes to */
>>
>> +#define MAX_COLOR    32767        /* max value that fits in 'color' datatype */
>
> This should use SHRT_MAX, no?  (Not that any supported platform differs here.)

I considered that, but I got all confused on whether limits.h needs to 
be included and where, if we use that. So I just used a constant 32767 
in the end. Committed that way.

I opened a ticket in TCL bug tracker for this: 
https://sourceforge.net/tracker/?func=detail&aid=3610026&group_id=10894&atid=110894. 


- Heikki



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: psql crash fix
Next
From: Andrew Dunstan
Date:
Subject: puzzling JSON bug