From: | "Patrick Bye (WFF)" <PBYE(at)Westfair(dot)CA> |
---|---|
To: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
Subject: | Segmentation fault in psql |
Date: | 2003-02-24 16:37:44 |
Message-ID: | 0D485272F9CB4E4AA9171FD13CBAC78206BD9D98@ntexsrvr.westfair.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm getting a segmentation fault in psql in 7.3.2. Last working version I
had was 7.2.4. Here's the backtrace from the debugger.
> Program received signal SIGSEGV, Segmentation fault.
> 0x4017c8f8 in strlen () at ../sysdeps/generic/strlen.c:150
> 150 ../sysdeps/generic/strlen.c: No such file or directory.
> (gdb) bt
> #0 0x4017c8f8 in strlen () at ../sysdeps/generic/strlen.c:150
> #1 0x4017c5f8 in strdup () at strdup.c:49
> #2 0x412870 in SetVariable (space=0x443aa0, name=0x410a51 "ENCODING",
> value=0xd105810 <Address 0xd105810 out of bounds>) at variables.c:107
> #3 0x41112c in main (argc=2, argv=0x0) at startup.c:227
I'm getting an invalid address back everytime pg_encoding_to_char is called.
I added a printf to the function (shown below) and then everything works
fine. I think it has something to do with the optimizations but I don't
know where to change that.
const char *
pg_encoding_to_char(int encoding)
{
if (PG_VALID_ENCODING(encoding))
{
pg_enc2name *p = &pg_enc2name_tbl[encoding];
Assert(encoding == p->encoding);
printf("p->name = %s\n",p->name);
return p->name;
}
return "";
}
Patrick Bye
Programmer / Analyst
Westfair Foods Ltd.
pbye(at)westfair(dot)ca
(403) 291-6538
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2003-02-24 16:42:06 | Re: What filesystem? |
Previous Message | Patrick Fiche | 2003-02-24 16:32:53 | Re: how do i avoid multiple sessions from inserting the same row? |