https://bugs.winehq.org/show_bug.cgi?id=37248
Bug ID: 37248 Summary: Floating point stack fault in a program compiled with Silverfrost FTN95 Product: Wine Version: 1.7.25 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: pepalogik@seznam.cz
I use Silverfrost FTN95 compiler http://www.silverfrost.com/11/ftn95/ftn95_fortran_95_for_windows.aspx for debugging a Fortran 77 code. This compiler has quite a unique CHECKMATE feature which performs various run-time checks, but this compiler is Windows-only. First it seemed to work fine in Wine but then, when I used a larger code, the program execution resulted in a floating point stack fault. Note that the compiler itself works correctly in Wine, but the resulting CHECKMATE-enabled executable fails (while the very same executable runs well on Windows).
I was happy when I found a workaround: to compile the program with /F_STDCALL. Unfortunately, this turned out to be insufficient for an even larger code (it is actually the same program with just larger parameter values and thus larger arrays and more iterations in various cycles). For this code, /F_STDCALL only causes the floating point stack fault to occur later.
I cannot 100% guarantee that the code is correct - a floating point stack fault can be caused e.g. by calling a function with an incorrectly specified return type. However, I think this is unlikely for the following reasons: 1. It does work on MS Windows, 2. It has been checked with two different compilers (FTN95 and gfortran). 3. It has been checked with Silverfrost's CHECKMATE run-time checking (as it runs on Windows without failure). 4. It has been checked by me. Hence I guess it is a bug in Wine.
What files do you need to tackle this problem? As the executable needs a Silverfrost's runtime library, you will have to install FTN95 in any case. I suggest that I will upload these files and information: * program source, * compiling instructions, * input files (which are required by the program).
I will now wait for either your response or the appearance of Wine 1.7.26 in the PPA (it seems to be to complicated for me to build it from the source). If the latter happens earlier, I will check if the bug persists and upload the files I have suggested.
https://bugs.winehq.org/show_bug.cgi?id=37248
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.silverfrost.com/ | |11/ftn95/ftn95_fortran_95_f | |or_windows.aspx
--- Comment #1 from Austin English austinenglish@gmail.com --- You forgot to attach your testcase
https://bugs.winehq.org/show_bug.cgi?id=37248
--- Comment #2 from Jan Lachnitt pepalogik@seznam.cz --- Created attachment 49552 --> https://bugs.winehq.org/attachment.cgi?id=49552 Program source and input files
https://bugs.winehq.org/show_bug.cgi?id=37248
--- Comment #3 from Jan Lachnitt pepalogik@seznam.cz --- So here it is.
INSTRUCTIONS:
Install FTN95 in Wine in 32-bit mode (i.e. WINEARCH=win32). I use 32-bit mode by default because some applications do not work in 64-bit mode. Then unpack wine-FTN95-crash-full.zip to an empty directory and cd to that directory in a terminal.
Now build the program with the build script... wineconsole build.bat
... and launch the program. wine satleed1.exe
It crashes with a floating point stack fault at energy 38 eV.
Optionally, you can also retry with the /F_STDCALL flag activated. This is a workaround that helps sometimes but not for this program. wineconsole build_with_F_STDCALL.bat
Before re-launching the program, it is necessary to delete old output files. rm tleed.o short.t
Now you can start the program again. wine satleed1.exe
Having been compiled with /F_STDCALL, it crashes somewhat later (at energy 39 eV).
VERIFICATION ON WINDOWS:
If you build and run the program on Windows, it does not crash (whether it has been compiled with or without /F_STDCALL). It does not matter whether you build the program on Windows or Linux with Wine. You can copy the files "satleed1.exe", "tleed4.i" and "tleed5.i" from one OS to the other and just launch "satleed1.exe" (the other two files are input files), so that you do not have to rebuild the program on the other OS. However, you always have to install FTN95 first as the executable uses its runtime library.
https://bugs.winehq.org/show_bug.cgi?id=37248
Jan Lachnitt pepalogik@seznam.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.silverfrost.com/ |http://www.ftn95.co.uk/ftn9 |11/ftn95/ftn95_fortran_95_f |5/ftn95-7.10/ftn95_personal |or_windows.aspx |.exe
https://bugs.winehq.org/show_bug.cgi?id=37248
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #4 from Austin English austinenglish@gmail.com --- Confirming.
[austin@localhost ~]$ sha1sum wine-FTN95-crash-full.zip ftn95_personal.exe 767f4e73b456d10df68e0217ff8c0bdf80f348da wine-FTN95-crash-full.zip f586431a400ee23363dbaadbbc9df221e47e7929 ftn95_personal.exe [austin@localhost ~]$ du -h wine-FTN95-crash-full.zip ftn95_personal.exe 136K wine-FTN95-crash-full.zip 52M ftn95_personal.exe [austin@localhost ~]$ wine --version wine-1.7.26-28-ge98eee8
https://bugs.winehq.org/show_bug.cgi?id=37248
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #5 from super_man@post.com --- (In reply to Austin English from comment #4)
Confirming.
[austin@localhost ~]$ sha1sum wine-FTN95-crash-full.zip ftn95_personal.exe 767f4e73b456d10df68e0217ff8c0bdf80f348da wine-FTN95-crash-full.zip f586431a400ee23363dbaadbbc9df221e47e7929 ftn95_personal.exe [austin@localhost ~]$ du -h wine-FTN95-crash-full.zip ftn95_personal.exe 136K wine-FTN95-crash-full.zip 52M ftn95_personal.exe [austin@localhost ~]$ wine --version wine-1.7.26-28-ge98eee8
Still an issue 1.9.5