Hi Richard, here is the backtrace: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x06a0afe1 0xa0b02584 in std::wclog () (gdb) bt #0 0xa0b02584 in std::wclog () #1 0xa0b025f0 in std::wclog () #2 0x00009db7 in global constructors keyed to cl_module__cl_prin_globals__firstglobalfun () at ./base/output/ cl_prin_globals.cc:33 #3 0x00009c9a in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at ../include/cln/io.h:91 #4 0x00009db7 in global constructors keyed to cl_module__cl_prin_globals__firstglobalfun () at ./base/output/ cl_prin_globals.cc:33 #5 0x000026f4 in __static_initialization_and_destruction_0 (__initialize_p=2, __priority=65535) at ../include/cln/io.h:91 #6 0x0000275d in global constructors keyed to _Z15test_elementaryv () at exam.cc:51 #7 0x8fe10168 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkCon textE () #8 0x8fe0a516 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE () #9 0x8fe0ca08 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE () #10 0x8fe031b4 in __dyld__ZN4dyld24initializeMainExecutableEv () #11 0x0000264d in _call_mod_init_funcs () at /SourceCache/Csu/Csu-58/ crt.c:304 #12 0x00002579 in _start (argc=1, argv=0xbffff86c, envp=0xbffff874) at /SourceCache/Csu/Csu-58/crt.c:222 #13 0x00002529 in start () Christian
Christian Fleck wrote:
#0 0xa0b02584 in std::wclog () #1 0xa0b025f0 in std::wclog () #2 0x00009db7 in global constructors ... #7 0x8fe10168 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE ()
Does it work when you link the 'exam' executable statically? Bruno
here is the backtrace:
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x06a0afe1 0xa0b02584 in std::wclog () (gdb) bt #0 0xa0b02584 in std::wclog () #1 0xa0b025f0 in std::wclog () #2 0x00009db7 in global constructors keyed to cl_module__cl_prin_globals__firstglobalfun () at ./base/output/ cl_prin_globals.cc:33 #3 0x00009c9a in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at ../include/cln/io.h:91 #4 0x00009db7 in global constructors keyed to cl_module__cl_prin_globals__firstglobalfun () at ./base/output/ cl_prin_globals.cc:33 #5 0x000026f4 in __static_initialization_and_destruction_0 (__initialize_p=2, __priority=65535) at ../include/cln/io.h:91 #6 0x0000275d in global constructors keyed to _Z15test_elementaryv () at exam.cc:51 #7 0x8fe10168 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkCon textE () #8 0x8fe0a516 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE () #9 0x8fe0ca08 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE () #10 0x8fe031b4 in __dyld__ZN4dyld24initializeMainExecutableEv () #11 0x0000264d in _call_mod_init_funcs () at /SourceCache/Csu/Csu-58/ crt.c:304 #12 0x00002579 in _start (argc=1, argv=0xbffff86c, envp=0xbffff874) at /SourceCache/Csu/Csu-58/crt.c:222 #13 0x00002529 in start ()
Well, I've a (almost trivial) patch that makes it work fine on Intel Macs, according to the submitter of the bug. For the next release, I intend to fix it in a very conservative way. For this purpose, I need to know how to identify an Intel Mac using preprocessor macros. Does anyone on this list know which macro is set there? (Hint: on a Linux system, that would be "__linux__".) (I've already tried contacting people, finding it in the gcc sources, googling, but was unable to find anything.) Regards -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
Hi Richard, * Richard B. Kreckel wrote on Thu, Apr 27, 2006 at 10:38:32PM CEST:
Well, I've a (almost trivial) patch that makes it work fine on Intel Macs, according to the submitter of the bug. For the next release, I intend to fix it in a very conservative way. For this purpose, I need to know how to identify an Intel Mac using preprocessor macros. Does anyone on this list know which macro is set there? (Hint: on a Linux system, that would be "__linux__".)
Well, if "echo | gcc -E -dM -" on that system doesn't help to find one, how about AC_DEFINEing one yourself based on $host? Cheers, Ralf
Richard B. Kreckel wrote:
I need to know how to identify an Intel Mac using preprocessor macros. Does anyone on this list know which macro is set there?
#if defined(__APPLE__) && defined(__MACH__) to test for MacOS X, #if defined(__i386__) to test for an x86 CPU. Find attached the complete output of "echo | gcc -E -dM -ansi - | sort". Bruno #define __APPLE_CC__ 5250 #define __APPLE__ 1 #define __CHAR_BIT__ 8 #define __CONSTANT_CFSTRINGS__ 1 #define __DBL_DENORM_MIN__ 4.9406564584124654e-324 #define __DBL_DIG__ 15 #define __DBL_EPSILON__ 2.2204460492503131e-16 #define __DBL_HAS_INFINITY__ 1 #define __DBL_HAS_QUIET_NAN__ 1 #define __DBL_MANT_DIG__ 53 #define __DBL_MAX_10_EXP__ 308 #define __DBL_MAX_EXP__ 1024 #define __DBL_MAX__ 1.7976931348623157e+308 #define __DBL_MIN_10_EXP__ (-307) #define __DBL_MIN_EXP__ (-1021) #define __DBL_MIN__ 2.2250738585072014e-308 #define __DECIMAL_DIG__ 21 #define __DYNAMIC__ 1 #define __FINITE_MATH_ONLY__ 0 #define __FLT_DENORM_MIN__ 1.40129846e-45F #define __FLT_DIG__ 6 #define __FLT_EPSILON__ 1.19209290e-7F #define __FLT_EVAL_METHOD__ 0 #define __FLT_HAS_INFINITY__ 1 #define __FLT_HAS_QUIET_NAN__ 1 #define __FLT_MANT_DIG__ 24 #define __FLT_MAX_10_EXP__ 38 #define __FLT_MAX_EXP__ 128 #define __FLT_MAX__ 3.40282347e+38F #define __FLT_MIN_10_EXP__ (-37) #define __FLT_MIN_EXP__ (-125) #define __FLT_MIN__ 1.17549435e-38F #define __FLT_RADIX__ 2 #define __GNUC_MINOR__ 0 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC__ 4 #define __GXX_ABI_VERSION 1002 #define __INTMAX_MAX__ 9223372036854775807LL #define __INTMAX_TYPE__ long long int #define __INT_MAX__ 2147483647 #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L #define __LDBL_DIG__ 18 #define __LDBL_EPSILON__ 1.08420217248550443401e-19L #define __LDBL_HAS_INFINITY__ 1 #define __LDBL_HAS_QUIET_NAN__ 1 #define __LDBL_MANT_DIG__ 64 #define __LDBL_MAX_10_EXP__ 4932 #define __LDBL_MAX_EXP__ 16384 #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __LDBL_MIN_10_EXP__ (-4931) #define __LDBL_MIN_EXP__ (-16381) #define __LDBL_MIN__ 3.36210314311209350626e-4932L #define __LITTLE_ENDIAN__ 1 #define __LONG_LONG_MAX__ 9223372036854775807LL #define __LONG_MAX__ 2147483647L #define __MACH__ 1 #define __MMX__ 1 #define __NO_INLINE__ 1 #define __PIC__ 1 #define __PTRDIFF_TYPE__ int #define __REGISTER_PREFIX__ #define __SCHAR_MAX__ 127 #define __SHRT_MAX__ 32767 #define __SIZE_TYPE__ long unsigned int #define __SSE2_MATH__ 1 #define __SSE2__ 1 #define __SSE_MATH__ 1 #define __SSE__ 1 #define __STDC_HOSTED__ 1 #define __STRICT_ANSI__ 1 #define __UINTMAX_TYPE__ long long unsigned int #define __USER_LABEL_PREFIX__ _ #define __VERSION__ "4.0.1 (Apple Computer, Inc. build 5250)" #define __WCHAR_MAX__ 2147483647 #define __WCHAR_TYPE__ int #define __WINT_TYPE__ int #define __i386 1 #define __i386__ 1 #define __i686 1 #define __i686__ 1 #define __pentiumpro 1 #define __pentiumpro__ 1 #define __strong #define __tune_nocona__ 1 #define __weak
participants (4)
-
Bruno Haible
-
Christian Fleck
-
Ralf Wildenhues
-
Richard B. Kreckel