crossbridge-community / crossbridge

C/C++ Compiler for the ActionScript Virtual Machine (AVM2)
http://sourceforge.net/projects/crossbridge-community/
Other
151 stars 36 forks source link

Futures: Fix failing extralib - dmalloc #31

Closed vpmedia closed 3 months ago

vpmedia commented 10 years ago
clang -g -O2  -DHAVE_STDARG_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_MMA
N_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_W32API_WINBASE_H=0 -DHAVE_W32API_WINDEF_H=0 -DHAVE_SYS_CYGWIN_H=0
-DHAVE_SIGNAL_H=1  -I. -I/cygdrive/f/crossbridge-futures/dmalloc-5.5.2  -c /cygdrive/f/crossbridge-f
utures/dmalloc-5.5.2/arg_check.c -o ./arg_check.o
Stack dump:
0.      Program arguments: /cygdrive/f/crossbridge-futures/sdk/usr/bin/clang -cc1 -triple avm2-unkno
wn-freebsd8 -S -disable-free -disable-llvm-verifier -main-file-name arg_check.c -mrelocation-model s
tatic -mdisable-fp-elim -fmath-errno -momit-leaf-frame-pointer -g -coverage-file /tmp/arg_check-cdKN
I1.s -resource-dir /cygdrive/f/crossbridge-futures/sdk/usr/bin/../lib/clang/3.2 -D HAVE_STDARG_H=1 -
D HAVE_STDLIB_H=1 -D HAVE_STRING_H=1 -D HAVE_UNISTD_H=1 -D HAVE_SYS_MMAN_H=1 -D HAVE_SYS_TYPES_H=1 -
D HAVE_W32API_WINBASE_H=0 -D HAVE_W32API_WINDEF_H=0 -D HAVE_SYS_CYGWIN_H=0 -D HAVE_SIGNAL_H=1 -I . -
I /cygdrive/f/crossbridge-futures/dmalloc-5.5.2 -isysroot /cygdrive/f/crossbridge-futures/sdk/usr/bi
n/../.. -fmodule-cache-path /var/tmp/clang-module-cache -O2 -fno-dwarf-directory-asm -fdebug-compila
tion-dir /cygdrive/f/crossbridge-futures/build/win/dmalloc -ferror-limit 19 -fmessage-length 100 -ms
tackrealign -fobjc-runtime=gcc -fsjlj-exceptions -fdiagnostics-show-option -fcolor-diagnostics -o /t
mp/arg_check-cdKNI1.s -x c /cygdrive/f/crossbridge-futures/dmalloc-5.5.2/arg_check.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '/cygdrive/f/crossbridge-futures/dmalloc-5.5.
2/arg_check.c'.
Error: Failed to open /tmp/arg_check-cdKNI1.s for input
clang: error: assembler command failed with exit code 255 (use -v to see invocation)
Makefile:362: recipe for target 'arg_check.o' failed
make[2]: *** [arg_check.o] Error 255
make[2]: Leaving directory '/cygdrive/f/crossbridge-futures/build/win/dmalloc'
Makefile:957: recipe for target 'dmalloc' failed
make[1]: *** [dmalloc] Error 2
make[1]: Leaving directory '/cygdrive/f/crossbridge-futures'
Makefile:268: recipe for target 'all_dev' failed
make: *** [all_dev] Error 2
vpmedia commented 10 years ago

Crashes: clang -g -O2 -DHAVE_STDARG_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_W32API_WINBASE_H=0 -DHAVE_W32API_WINDEF_H=0 -DHAVE_SYS_CYGWIN_H=0 -DHAVE_SIGNAL_H=1 -I. -I/cygdrive/f/crossbridge-futures/dmalloc-5.5.2 -c /cygdrive/f/crossbridge-futures/dmalloc-5.5.2/arg_check.c -o ./arg_check.o

Works: clang -O2 -DHAVE_STDARG_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_W32API_WINBASE_H=0 -DHAVE_W32API_WINDEF_H=0 -DHAVE_SYS_CYGWIN_H=0 -DHAVE_SIGNAL_H=1 -I. -I/cygdrive/f/crossbridge-futures/dmalloc-5.5.2 -c /cygdrive/f/crossbridge-futures/dmalloc-5.5.2/arg_check.c -o ./arg_check.o

So the '-g -O2' debug flag is the reason.. but '-g -O4' works

vpmedia commented 10 years ago

New error with -O3 flag:

./dmalloc_fc_t -s  
RangeError: Error #1506
Makefile:347: recipe for target 'light' failed