Re: use of initcap() causes segfault in v8.0.0beta5, where it doesn't in v7.4.6 (coredump included) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: use of initcap() causes segfault in v8.0.0beta5, where it doesn't in v7.4.6 (coredump included)
Date
Msg-id 20953.1101517666@sss.pgh.pa.us
Whole thread Raw
In response to use of initcap() causes segfault in v8.0.0beta5, where it doesn't in v7.4.6 (coredump included)  (Frank van Vugt <ftm.van.vugt@foxi.nl>)
List pgsql-bugs
Frank van Vugt <ftm.van.vugt@foxi.nl> writes:
> (Further examination revealed that a simple 'select initcap('f')' is
> enough to bring the backend down......)

Works for me in unicode encoding + C locale on a couple different platforms.

> # uname -a
> Linux gatefox 2.2.16 #15 Wed Feb 12 12:14:42 CET 2003 i686 unknown
> (yes, fairly old, I know....)

Possibly a bug in your old glibc version?

Can anyone else reproduce this?

> (gdb) where
> #0  0x4016e501 in towupper () from /lib/libc.so.6
> #1  0x81a45e2 in initcap (fcinfo=0xbfffdfdc) at oracle_compat.c:312

Since towupper takes an integer not a pointer, it's hard to see why a
crash within it wouldn't be a bug in towupper rather than being blamable
on bad supplied data.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Frank van Vugt
Date:
Subject: use of initcap() causes segfault in v8.0.0beta5, where it doesn't in v7.4.6 (coredump included)
Next
From: Tom Lane
Date:
Subject: Re: use of initcap() causes segfault in v8.0.0beta5, where it doesn't in v7.4.6 (coredump included)