Re: strange path through code (initdb problem) - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: strange path through code (initdb problem)
Date
Msg-id 199808282325.TAA24086@candle.pha.pa.us
Whole thread Raw
In response to Re: strange path through code (initdb problem)  (Keith Parks <emkxp01@mtcc.demon.co.uk>)
List pgsql-hackers
>
> Bruce Momjian <maillist@candle.pha.pa.us>
>
> > Are you compiling with optimization. Thay may do it.
>
> Yes, and it does :-(
>
> Compiled with -O0 everything works fine (well almost).
> With -O2, the default, I get the SIGSEGV as before.
>
> I seem to remember I had this optimisation problem some while
> ago and someone, Thomas?, fixed it by rewriting some code.
>
> So, for now I'm reasonably happy and can get on with some
> testing.

If you can find out which file is the problem, we can probably fix it
without access to the machine.

You can compile everything with -O2, then change your optimization in
Makefile.custom to -O0.  Go to psql/src/backend and 'cd' to a directory,
do a 'make clean', then a make,make install and test initdb.  As soon as
it starts working, you have your directory.  Or you could compile
everything with -O0 and start doing -O2 compiles until it breaks.

When you find the directory, find the file by recompiling one at a time.
Once you find the file, I think I can figure out what is wrong with the
file.  I can go through the diff since 6.3.2, and see what has changed.



--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

pgsql-hackers by date:

Previous
From: Keith Parks
Date:
Subject: Re: strange path through code (initdb problem)
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Segmentation fault with lo_export