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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: use of initcap() causes segfault in v8.0.0beta5, where it doesn't in v7.4.6 (coredump included)
Date: 2004-11-27 01:07:46
Message-ID: 20953.1101517666@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-11-27 01:17:16 Re: use of initcap() causes segfault in v8.0.0beta5, where it doesn't in v7.4.6 (coredump included)
Previous Message Frank van Vugt 2004-11-27 00:38:13 use of initcap() causes segfault in v8.0.0beta5, where it doesn't in v7.4.6 (coredump included)