On Sat, May 28, 2005 at 12:52:22PM +0200, Enrico Zini wrote: > I'm maintaining a swig-generated perl module (libdebtags-perl, in > experimental) which when compiled with -O2 causes the perl program to > segfault on exit (some memory gets garbled and the destructors choke). > Compiled with -O0, no problems.
> I've noticed that the perl policy at "4.3. Vendor Installation" wants me > to compile with -O2. Is this segfault issue enough to have an > exception, or are there more reasons for -O2 besides performance? AFAIK the -O2 recommendation is primarily because it's a reasonable default optimization level for software; packages frequently use -O0 on one architecture or another to work around toolchain bugs. But it doesn't sound like what you have here is a toolchain bug, it sounds like you have a source bug that manifests differently under different optimization levels. Could you please try to debug the memory error instead of working around it? You may find valgrind useful for this. -- Steve Langasek postmodern programmer
signature.asc
Description: Digital signature