#At bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-6.0-falcon/
2692 Olav Sandstaa 2008-06-05
Fix to one of the issues in Bug #36745 falcon crash on solaris
The problem was a memory alignment issue in SymbolManager.cpp that caused
a crash when running in 64 bit mode on Solaris on SPARC. Fixed this
by ensuring the symbol objects are allocated at 8 byte boundaries
when compiling for 64 bit systems.
modified:
storage/falcon/SymbolManager.cpp
per-file comments:
storage/falcon/SymbolManager.cpp
Allocate symbol object with 4 or 8 byte allignement depending on the build being for
32 bit or 64 bit architectures.
=== modified file 'storage/falcon/SymbolManager.cpp'
--- a/storage/falcon/SymbolManager.cpp 2007-09-20 15:44:25 +0000
+++ b/storage/falcon/SymbolManager.cpp 2008-06-05 13:41:27 +0000
@@ -124,7 +124,7 @@
sync.unlock();
sync.lock (Exclusive);
- symbol = (Symbol*) ((IPTR)(next + 3) & ~3);
+ symbol = (Symbol*) (ROUNDUP(((IPTR)(next)), sizeof(void*)));// adr alignment
IPTR length = p - string;
if (symbol->symbol + length > sections->space + sizeof (sections->space))
@@ -180,7 +180,7 @@
sync.unlock();
sync.lock (Exclusive);
- symbol = (Symbol*) ((IPTR)(next + 3) & ~3);
+ symbol = (Symbol*) (ROUNDUP(((IPTR)(next)), sizeof(void*)));// adr alignment
IPTR length = p - string;
if (symbol->symbol + length > sections->space + sizeof (sections->space))