Monday, December 10, 2007

Leopard V's Tiger

Looks like we are going to need separate download binaries for Firebird on Leopard and pre-Leopard (Tiger). Firebird 2.0.3 compiled on Leopard works perfectly on Leopard, but when you try to run and install Firebird that was built on Leopard on Tiger, all the utilities give a bus error, and you get the following type of debug trace from gdb:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x302188f0 in Firebird::MemoryPool::allocate_nothrow ()
(gdb) bt
#0 0x302188f0 in Firebird::MemoryPool::allocate_nothrow ()
#1 0x3000e5d6 in gds__alloc_debug ()
#2 0x00012c8f in parse_arg ()
#3 0x00018d51 in ISQL_main ()
#4 0x000190bf in main ()

Supposedly a
EXC_BAD_ACCESS/KERN_PROTECTION_FAILURE — is caused by the thread trying to write to read-only memory. This is always caused by a data access.

So why does Firebird 2.03 compiled on Tiger work perfectly? For some strange reason we smell a rat with either the Operating System or the compiler. But what the problem is - is a very good question. I am open to suggestions.

Using the link command:

-Wl,-macosx_version_min -Wl,10.4 has no effect.

No comments: