Subject: Re: Strange segmentation fault trying to run postgresql on current
To: Alex Pelts <alexp@broadcom.com>
From: =?ISO-8859-1?Q?R=E9mi_Zara?= <remi.zara@free.fr>
List: port-cobalt
Date: 04/30/2007 19:03:37
Le 30 avr. 07 =E0 05:54, Alex Pelts a =E9crit :

> You can see that v0 is loaded from memory location pointed by gp. I =20=

> guess some sort of small data area optimization of some sort. The =20
> offset is a bit large for the structure access. Unless it is array =20
> or a large structure.
>
> You also need to post c source that generates this code.

You can read the c source here:

http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/main/=20
main.c?rev=3D1.108;content-type=3Dtext%2Fx-cvsweb-markup

The app crashes before the call to save_ps_display_args, but after =20
the call to get_progname(argv[0]) which seems to be returning a =20
correct value.
startup_hacks(progname) gets optimized out (because it turns out =20
empty) at -O2

> I run in to similar problem when code would run on linux but would =20
> produce exception on nucleus and vxworks. Turned out that linux =20
> exception handler would recover from unaligned access by loading =20
> register and continuing program. Maybe this is the case for this =20
> application as well. No one checked this app on mips.
>

PostgreSQL builds and runs OK on debian 3.1 MIPS, but maybe it's due =20
to the unaligned trap handler

Regards,

R=E9mi Zara=