Runtime error while compile with mingw gcc(4.6.1)

Started by iNPRwANG, April 19, 2012, 06:28:57 PM

Previous topic - Next topic

iNPRwANG

While I compile newlisp 10.4.2 on windows mingw gcc(4.6.1), and run the target, it looks good for all test.

But if only cause a error in code, like run a undefine function:



(aa)


That will show a error message, and make a fatal error messagebox, then program will crash.



I try to build a version with no -O1 option with gcc(4.6.1), It works better!



I try to find the error from source, it looks crash at the "longjump" function while resume from error.



I try to compile newlisp on mingw gcc(3.4.5), the result is it woks all good.

Lutz

#1
Windows versions newLISP  10.4.0 and 10.4.1 are compiled using gcc 4.4.0 for 32-bit and using either makefile "makefile_mingw_ffi" or "makefile_mingw_utf8_ffi". That makefile also specifies -O1, do not use -O2. You should see no warning messages.



What makefile are you using ?

Are you on Windows XP or on Windows 7 ?

Maybe, 4.6.1 is compiling for 64-bit by default, try to add the -m32 compile flag.





Ps:

The Linux UBUNTU version uses gcc 4.6.1 and the -O2 flag in makefile_linux_utf8_ffi (-O1 works, but slower)

The Mac OSX Lion version uses gcc 4.2.1 and the -O1 flag in makefile_darwin_utf8-ffi. (-O2 works, but same speed and bigger executable)

All compiles should be without warning messages.

iNPRwANG

#2
I use the default makefile named "makefile_mingw_utf8_ffi", and did not to modity it. (just use the -01)

My system is Windows XP sp3 32bit, lib ffi also compile with gcc 4.6.1.

Use newlisp version is 10.4.2 in-progress.  : )



The fatal error message with a msvcrt.dll callstack, function is longjump.