[Bug modula2/108344] Many tests time out: isatty called in a tight loop

2023-07-28 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108344

--- Comment #7 from CVS Commits  ---
The releases/gcc-13 branch has been updated by Gaius Mulley
:

https://gcc.gnu.org/g:35a04220554d62d9bbe068dfa2f52d4d2d572805

commit r13-7636-g35a04220554d62d9bbe068dfa2f52d4d2d572805
Author: Gaius Mulley 
Date:   Fri Jul 28 22:50:41 2023 +0100

[PATCH] PR modula2/108344 disable default opening of /dev/tty

This patch changes removes the static initialisation code for
KeyBoardLEDs.cc.  The module is only initialised if one of the
exported functions is called.  This is useful as the module will
access /dev/tty which might not be available.  TimerHandler.mod has
also been changed to disable the scroll lock LED as a sign of life.

gcc/m2/ChangeLog:

PR modula2/108344
* gm2-libs-coroutines/TimerHandler.mod (EnableLED): New
constant.
(Timer): Test EnableLED before switching on the scroll LED.

libgm2/ChangeLog:

PR modula2/108344
* libm2cor/KeyBoardLEDs.cc (initialize_module): New
function.
(SwitchScroll): Call initialize_module.
(SwitchNum): Call initialize_module.
(SwitchCaps): Call initialize_module.
(SwitchLEDs): Call initialize_module.
(M2EXPORT): Remove initialization code.

(cherry picked from commit cf4dcfa6727b89362494bd49e2a28ebd10d767ce)

Signed-off-by: Gaius Mulley 

[Bug modula2/108344] Many tests time out: isatty called in a tight loop

2023-06-14 Thread ro at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108344

Rainer Orth  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #6 from Rainer Orth  ---
I hadn't seen those timeout for quite some time even before your patch
(roughly since 20230123). So it seems whatever caused this is fixed (or at
least masked).

[Bug modula2/108344] Many tests time out: isatty called in a tight loop

2023-05-16 Thread gaius at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108344

--- Comment #5 from Gaius Mulley  ---
On reflection I suspect it is doubtful this is the same bug.  However it might
reduce the timeouts when running the regression tests.

[Bug modula2/108344] Many tests time out: isatty called in a tight loop

2023-05-16 Thread gaius at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108344

Gaius Mulley  changed:

   What|Removed |Added

   Last reconfirmed||2023-05-16
 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1

--- Comment #4 from Gaius Mulley  ---
A patch has been applied which was created as a response to another bug (on the
gm2 mailing list).  [A request to not open /dev/tty by default].

[Bug modula2/108344] Many tests time out: isatty called in a tight loop

2023-05-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108344

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Gaius Mulley :

https://gcc.gnu.org/g:cf4dcfa6727b89362494bd49e2a28ebd10d767ce

commit r14-912-gcf4dcfa6727b89362494bd49e2a28ebd10d767ce
Author: Gaius Mulley 
Date:   Tue May 16 15:51:53 2023 +0100

PR modula2/108344 disable default opening of /dev/tty

This patch changes removes the static initialisation code for
KeyBoardLEDs.cc.
The module is only initialised if one of the exported functions is called.
This is useful as the module will access /dev/tty which might not be
available.  TimerHandler.mod has also been changed to disable the scroll
lock LED as a sign of life.

gcc/m2/ChangeLog:

PR modula2/108344
* gm2-libs-coroutines/TimerHandler.mod (EnableLED): New constant.
(Timer): Test EnableLED before switching on the scroll LED.

libgm2/ChangeLog:

PR modula2/108344
* libm2cor/KeyBoardLEDs.cc (initialize_module): New function.
(SwitchScroll): Call initialize_module.
(SwitchNum): Call initialize_module.
(SwitchCaps): Call initialize_module.
(SwitchLEDs): Call initialize_module.
(M2EXPORT): Remove initialization code.

Signed-off-by: Gaius Mulley 

[Bug modula2/108344] Many tests time out: isatty called in a tight loop

2023-04-26 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108344

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|13.0|13.2

--- Comment #2 from Richard Biener  ---
GCC 13.1 is being released, retargeting bugs to GCC 13.2.

[Bug modula2/108344] Many tests time out: isatty called in a tight loop

2023-01-13 Thread ro at CeBiTec dot Uni-Bielefeld.DE via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108344

--- Comment #1 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
To gather more information, I've tried a -g3 -O0 build.  The failures
still occur, but the failure mode is slightly different: all the 64-bit
tests in gm2/iso/pass now SEGV in cc1gm2:

Core was generated by `/var/gcc/regression/master/11.4-gcc/build/gcc/cc1gm2
-fcpp-begin -E -lang-asm -'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0b38d8cf in LINEMAPS_MACRO_USED (set=0xfaee1000) at
/vol/gcc/src/hg/master/local/gcc/../libcpp/include/line-map.h:1002
1002  return LINEMAPS_USED (set, true);

#1  0x0b38d902 in LINEMAPS_MACRO_LOWEST_LOCATION (set=0xfaee1000) at
/vol/gcc/src/hg/master/local/libcpp/include/line-map.h:1025
#2  0x0b3b3815 in linemap_location_from_macro_expansion_p (set=0xfaee1000,
location=223680) at /vol/gcc/src/hg/master/local/libcpp/line-map.cc:1360
#3  0x0b3b2f64 in linemap_lookup (set=0xfaee1000, line=223680) at
/vol/gcc/src/hg/master/local/libcpp/line-map.cc:1055
#4  0x0b3b1c5d in pure_location_p (set=0xfaee1000, loc=223680) at
/vol/gcc/src/hg/master/local/libcpp/line-map.cc:342
#5  0x0b3b1708 in get_combined_adhoc_loc (set=0xfaee1000, locus=223680,
src_range=..., data=0x0, discriminator=0) at
/vol/gcc/src/hg/master/local/libcpp/line-map.cc:190
#6  0x0a029d7e in COMBINE_LOCATION_DATA (set=0xfaee1000, loc=223680,
src_range=..., block=0x0, discriminator=0) at
/vol/gcc/src/hg/master/local/gcc/../libcpp/include/line-map.h:1067
#7  0x0b3822f8 in make_location (caret=223680, src_range=...) at
/vol/gcc/src/hg/master/local/gcc/input.cc:1194
#8  0x09491abc in m2linemap_GetLocationRange (start=2096540, end=2096540) at
/vol/gcc/src/hg/master/local/gcc/m2/gm2-gcc/m2linemap.cc:102
#9  0x094a044f in updatepos () at
/vol/gcc/src/hg/master/local/gcc/m2/m2.flex:521
#10 0x094a0968 in yywrap () at /vol/gcc/src/hg/master/local/gcc/m2/m2.flex:756
#11 0x0949e9e3 in yylex () at
/var/gcc/regression/master/11.4-gcc/build/gcc/:1927
#12 0x094a07a7 in m2flex_GetToken () at
/vol/gcc/src/hg/master/local/gcc/m2/m2.flex:654
#13 0x094dea34 in M2LexBuf_GetToken () at m2/gm2-compiler-boot/M2LexBuf.c:958
#14 0x094dea39 in M2LexBuf_GetToken () at m2/gm2-compiler-boot/M2LexBuf.c:959
[...]
#2096552 0x094dea39 in M2LexBuf_GetToken () at
m2/gm2-compiler-boot/M2LexBuf.c:9
59
#2096553 0x094de8d7 in M2LexBuf_OpenSource (s=0xc0fa638) at
m2/gm2-compiler-boot
/M2LexBuf.c:855
#2096554 0x094bf342 in DoPass0 (s=0xc0f3550) at
m2/gm2-compiler-boot/M2Comp.c:304
#2096555 0x094befe1 in Compile (s=0xc0f3550) at
m2/gm2-compiler-boot/M2Comp.c:183
#2096556 0x094bfdae in M2Comp_compile (filename=0xfeffb441) at
m2/gm2-compiler-boot/M2Comp.c:760
#2096557 0x0949b9f5 in init_PerCompilationInit (filename=0xfeffb441
"/vol/gcc/src/hg/master/local/gcc/testsuite/gm2/iso/pass/ChanConsts.mod") at
/vol/gcc/src/hg/master/local/gcc/m2/gm2-gcc/init.cc:195
#2096558 0x09461457 in gm2_parse_input_files (filenames=0xc0907c0,
filename_count=2) at /vol/gcc/src/hg/master/local/gcc/m2/gm2-lang.cc:451
#2096559 0x09461485 in gm2_langhook_parse_file () at
/vol/gcc/src/hg/master/local/gcc/m2/gm2-lang.cc:458
#2096560 0x09c45c5c in compile_file () at
/vol/gcc/src/hg/master/local/gcc/toplev.cc:444
#2096561 0x09c48898 in do_compile (no_backend=false) at
/vol/gcc/src/hg/master/local/gcc/toplev.cc:2125
#2096562 0x09c48c11 in toplev::main (this=0xfeffa7aa, argc=79, argv=0xfeffa80c)
at /vol/gcc/src/hg/master/local/gcc/toplev.cc:2277
#2096563 0x0b328eee in main (argc=79, argv=0xfeffa80c) at
/vol/gcc/src/hg/master/local/gcc/main.cc:39

so we have unbounded recursion in M2LexBuf_GetToken.

[Bug modula2/108344] Many tests time out: isatty called in a tight loop

2023-01-09 Thread ro at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108344

Rainer Orth  changed:

   What|Removed |Added

   Target Milestone|--- |13.0