Open tueda opened 6 months ago
Rebased onto master.
The failure of Issue135_3
seems to have resolved itself, likely because of an update of the gcc version in the upstream (MSYS2).
The failure of Sta_Fill_1
may not be the fault of the compiler or Windows. It seems to contain intrinsically undefined behaviour. Actually, Valgrind (on Linux) shows stack overflows:
FORM 5.0.0-beta.1 (May 27 2024, v5.0.0-beta.1-69-gc571f77) Run: Mon May 27 14:48:08 2024
Table B(1:1);
Local dummy = 1;
.sort
Time = 0.04 sec Generated terms = 1
dummy Terms in output = 1
Bytes used = 20
Fill B(1) = dummy;
1.frm Line 4 --> Warning: Use of expressions and/or $variables in Fill statemen
ts is potentially very dangerous.
Drop dummy;
.sort
Local F = B(1);
Print;
.end
==73714== Stack overflow in thread #1: can't grow stack to 0x1ffe801000
==73714== Stack overflow in thread #1: can't grow stack to 0x1ffe801000
==73714== Can't extend stack to 0x1ffe801078 during signal delivery for thread 1:
==73714== no stack segment
==73714==
==73714== Process terminating with default action of signal 11 (SIGSEGV)
==73714== Access not within mapped region at address 0x1FFE801078
==73714== Stack overflow in thread #1: can't grow stack to 0x1ffe801000
==73714== at 0x1DF3F1: Generator (proces.c:3246)
==73714== If you believe this happened as a result of a stack
==73714== overflow in your program's main thread (unlikely but
==73714== possible), you can try to increase the size of the
==73714== main thread stack using the --main-stacksize= flag.
==73714== The main thread stack size used in this run was 8388608.
FYI, here is an experimental branch working with MSVC: https://github.com/tueda/form/tree/ci-msvc
Sta_Fill_1
results in an infinite loop of DoOnePow
, Generator
, Generator
, Generator
. I suppose the table entry references the expression "dummy", but in DoOnePow
we are using nexp=0
which at this point refers to F
. Hence the loop? FORM at least prints the warning.
So this one is nothing to do with windows, anyway.
Rebased.
Rebased.
This PR consists of 3 patches to improve the building binaries on Windows:
Though to some extent this is ready for a merge, there are still some remaining issues:
LF
without precedingCR
remains in output (https://github.com/vermaseren/form/issues/418#issuecomment-2094032590).2 failed tests.
Issue135_3
(features.frm:879)Sta_Fill_1
(examples.frm:647)Concerning the 2 test failures, both are caused by segfaults (
Sta_Fill_1
leads to a segfault also on Linux). The unexpected failures might be related to the fact that MSYS2 GCC is currently version 13.2.0, the buggy version (MSYS2 has no way to install a specific version like gcc 12).