Bug #8678 Compiler crashes on AIX, file 'item_func.cc', 'debug' build
Submitted: 22 Feb 2005 11:20 Modified: 3 Mar 2005 18:40
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:5.0.3-pre OS:IBM AIX (AIX 4.3 + 5.2)
Assigned to: Jim Winstead CPU Architecture:Any

[22 Feb 2005 11:20] Joerg Bruehe
Description:
This crash occurs only in 'debug' builds, others are not affected.
As a consequence, we cannot release 'debug' on AIX.

=== AIX 4.3:

source='item_func.cc' object='item_func.o' libtool=no \
depfile='.deps/item_func.Po' tmpdepfile='.deps/item_func.TPo' \
depmode=aix /bin/sh ../depcomp \
xlC_r -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/data\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../zlib -I../innobase/include -I../include -I../regex -I.  -I../include    -g -O -DDBUG_ON -DSAFE_MUTEX -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192   -Wa,-many -DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ -c -o item_func.o item_func.cc
"mysql_priv.h", line 901.36: 1540-1281 (W) "offsetof" cannot be applied to "struct st_table_list".  It is not a POD (plain old data) type.
"mysql_priv.h", line 909.36: 1540-1281 (W) "offsetof" cannot be applied to "struct st_table_list".  It is not a POD (plain old data) type.
xlC_r: 1501-224 fatal error in /usr/vacpp/exe/xlCentry: signal 11 received
make[4]: *** [item_func.o] Error 251

=== AIX 5.2:

source='item_func.cc' object='item_func.o' libtool=no \
depfile='.deps/item_func.Po' tmpdepfile='.deps/item_func.TPo' \
depmode=aix /bin/sh ../depcomp \
xlC_r -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/data\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../zlib -I../innobase/include -I../include -I../regex -I.  -I../include    -g -O -DDBUG_ON -DSAFE_MUTEX -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192   -c -o item_func.o item_func.cc
1540-5215 (W) No licenses available. Contact your program supplier to add additional users. Compilation will proceed shortly.
"/usr/include/alloca.h", line 34.9: 1540-1401 (W) An unknown "pragma __alloca" is specified.
"mysql_priv.h", line 901.36: 1540-1281 (W) "offsetof" cannot be applied to "struct st_table_list".  It is not a POD (plain old data) type.
"mysql_priv.h", line 909.36: 1540-1281 (W) "offsetof" cannot be applied to "struct st_table_list".  It is not a POD (plain old data) type.
xlC_r: 1501-230 Internal compiler error; please contact your Service Representative
make[4]: *** [item_func.o] Error 41

=== AIX 5.2, 64 bit:

source='item_func.cc' object='item_func.o' libtool=no \
depfile='.deps/item_func.Po' tmpdepfile='.deps/item_func.TPo' \
depmode=aix /bin/sh ../depcomp \
xlC_r -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/data\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../zlib -I../innobase/include -I../include -I../regex -I.  -I../include    -g -O -DDBUG_ON -DSAFE_MUTEX -q64 -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192   -c -o item_func.o item_func.cc
"/usr/include/alloca.h", line 34.9: 1540-1401 (W) An unknown "pragma __alloca" is specified.
"mysql_priv.h", line 901.36: 1540-1281 (W) "offsetof" cannot be applied to "struct st_table_list".  It is not a POD (plain old data) type.
"mysql_priv.h", line 909.36: 1540-1281 (W) "offsetof" cannot be applied to "struct st_table_list".  It is not a POD (plain old data) type.
xlC_r: 1501-230 Internal compiler error; please contact your Service Representative
make[4]: *** [item_func.o] Error 41

How to repeat:
Build 'debug' on AIX.
[22 Feb 2005 21:16] Kent Boortz
This compiler upgrade could be relevant. In the notes it say 
"IY64442 - Internal compiler error in xlCentry at noopt". 
I guess the debug build is without optimization, if that is 
what "noopt" means.

http://www-1.ibm.com/support/docview.wss?uid=swg24008967

Another hint that might work, is to lift some limits in
"/etc/security/limits". A -1 seem to mean unlimited.
[25 Feb 2005 0:34] Jim Winstead
I was able to do a bit of binary-search debugging to find out what caused the compiler to crash, and then found that simply moving that code to another part of the file allows it to compile.
[3 Mar 2005 18:40] Jim Winstead
Fixed for 5.0.3.