Firm Bugtracker - libFirm
Viewing Issue Advanced Details
6 unknown crash always 2008-12-03 14:58 2009-01-28 21:55
jeffz  
xt3firm  
normal  
closed 1.15.0  
fixed  
none    
none  
0000006: libFirm panic: Size of switch CondT[2045:144] bigger than 256000 while compiling SDL-1.2.1
on ./src/stdlib/SDL_iconv.c
libFirm panic: Size of switch CondT[2045:144] bigger than 256000

I also hit the same panic when attempting to compile winecfg's theme.c from Wine 1.1.4:

libFirm panic: Size of switch CondT[28576:78] bigger than 256000
c file icon switch2.c [^] (236 bytes) 2008-12-05 12:01
c file icon pp-switch2.c [^] (638 bytes) 2008-12-05 12:04
Issue History
2008-12-03 14:58 jeffz New Issue
2008-12-03 23:26 Tron Note Added: 0000005
2008-12-03 23:26 Tron Status new => feedback
2008-12-04 00:38 jeffz Note Added: 0000008
2008-12-05 11:19 Matze Note Added: 0000011
2008-12-05 12:00 jeffz Issue Monitored: jeffz
2008-12-05 12:01 jeffz File Added: switch2.c
2008-12-05 12:01 jeffz Note Added: 0000012
2008-12-05 12:04 jeffz File Added: pp-switch2.c
2008-12-05 12:04 jeffz Note Added: 0000013
2008-12-05 12:15 jeffz Issue End Monitor: jeffz
2008-12-05 12:30 jeffz Note Added: 0000014
2008-12-05 15:37 xt3firm Note Added: 0000015
2008-12-05 15:38 xt3firm Status feedback => closed
2008-12-05 15:38 xt3firm Status closed => assigned
2008-12-05 15:38 xt3firm Assigned To => xt3firm
2008-12-05 15:39 xt3firm Note Deleted: 0000015
2008-12-05 15:39 xt3firm Note Added: 0000016
2008-12-05 15:39 xt3firm Status assigned => resolved
2008-12-05 15:39 xt3firm Resolution open => fixed
2009-01-28 21:55 Matze Status resolved => closed

Notes
(0000005)
Tron   
2008-12-03 23:26   
Are you sure you mean SDL 1.2.1? This version does not seem to contain SDL_iconv.c. I tried building SDL 1.2.13, which has SDL_iconv.c. The file compiled fine. Did you use any special flags?
(0000008)
jeffz   
2008-12-04 00:38   
Yeah, I meant SDL 1.2.13.

/bin/bash ./libtool --mode=compile /home/jeffz/Desktop/cparser-0.9.7/build/cparser -g -O2 -I./include -D_GNU_SOURCE=1 -D_REENTRANT -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/stdlib/SDL_iconv.c -o build/SDL_iconv.lo
(0000011)
Matze   
2008-12-05 11:19   
I really can't reproduce this even with vanilla SDL 1.2.13 and your switches.

So it would be helpfull if you could give us some more details about your system (maybe you have a 64bit box or something which could explain the effects) and preprocessed sources would also be a good thing (use the same commandline with -E instead of -c to get preprocessed source).
(0000012)
jeffz   
2008-12-05 12:01   
Yeah, I'm using 64bit Ubuntu 8.04. I've reduced the error to the attached testcase.
(0000013)
jeffz   
2008-12-05 12:04   
Also attached for reference is the preprocessed (-E) output of the testcase.
(0000014)
jeffz   
2008-12-05 12:30   
I can confirm that if I rebuild cparser and libfirm as 32bit by running CC="gcc -m32" ./configure, then the issue does not occur.
(0000016)
xt3firm   
2008-12-05 15:39   
Fixed by r24329, was mixture of long and int types.