Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MacOS X core dumps - gcc compiler crashes



Use -v with -save-temps (or with -no-cpp-precomp, gcc will use the builtin preprocessor),
then follow the instructions from Chris Ridd.

Thanks,
Andrew Pinski

On Monday, Jun 16, 2003, at 03:12 US/Eastern, Bill Northcott wrote:

From: Chris Ridd <email@hidden>

If you try compiling using gcc -v compilerbreaker.c, you will see the
exact
commandlines that the gcc driver is using to execute cc1obj. Presumably
if
you run cc1obj yourself using the identical args, you'll get a nice core
dump...

Nice try. Unfortunately the compiler driver first gets the pre-compiler
to produce a temporary file and then invokes cc1obj to process it. After
the crash it cleans up! So you cannot try again.

It has been suggested that I could replace cc1obj with a wrapper script
that invokes it under gdb and trap the crash like that. I will give it a
try.

I say presumably, because trying to use -fgnu-runtime with an
Objective-C
program as you described does not crash for me.

Try
#include <objc/Object.h>

@interface FooBar: Object
- (void)boo;
@end

int main ()
{
id fooBarInst = [[FooBar alloc] init];

[fooBarInst boo];

return 0;

}

That crashes every time for me with the Apple compiler but not the FSF
version.

Bill Northcott
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.