This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++ regression in trunk


On May 30, 2006, at 3:25 PM, Jack Howarth wrote:
...and I get no hits suggesting it can't be a wrong visibility problem.

I prefer the idea that it reduces the likelihood of such a problem. :-)


Is there some approach I can use to figure out if it is a throw across
a dylib or bundle boundary?

Yes. If you aren't using bundles forget about that issue. The approach is to write a dylib and app that mirror the direction you are throwing.


For example, the obvious:

main() {
  try { dylib(); } catch(...) { printf("It worked"."); }
}

and in the dylib:

void dolib() {
  throw 1;
}

tests to see if a throw from a dylib into the app works.

I noticed from the 4.2 change page that...

The configure variable enable-__cxa_atexit is now enabled by default

Is darwin one of those targets that changed at 4.2? If so is there a flag
to reverse that behavior for individual source files?

Why ask me, when you can ask the compiler with documented -fuse-cxa- atexit and -fno-use-cxa-atexit flags and have it tell you with amazing accuracy? Yes, Geoff has been playing in this area. It had been off, and it later versions, it is on. You can check the ChangeLog file and find:


2006-03-15 Geoffrey Keating <geoffk@apple.com>

* config.gcc (*-*-darwin*): Don't build crt2.o for all Darwin ports.
Do switch on default_use_cxa_atexit.
(powerpc*-*-darwin*): Build crt2.o on powerpc.
* config/darwin-crt3.o: New.
* config/darwin.h (LINK_SPEC): If -shared-libgcc, make linker default
to 10.3. Pass '-multiply_defined suppress' if crt3.o is in use.
(STARTFILE_SPEC): Add crt3.o when -shared-libgcc and appropriate
OS version.
* config/rs6000/t-darwin: Move crt2.o building to here.
* config/rs6000/darwin.h (C_COMMON_OVERRIDE_OPTIONS): Update
Mac OS version for using __cxa_get_exception_ptr. Don't test versions
of __cxa_atexit.


and you can also test before and after it to see if it is related, though, in theory the -f flags should be enough.

Also, this list isn't the right place to obtain help with broken user code, just broken compiler code. Ideally, we want you to first debug it and then ask here for help after broken user code is ruled out. If the app shows an issue with the new cxa code-gen, I'd hazard a guess that it is an app bug [ fingers crossed ].


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]