theimpossibleastronaut / modemu2k

modemu2k is a fork of modemu, a telnet client with a modem-like user interface
https://theimpossibleastronaut.com/modemu2k
GNU General Public License v3.0
10 stars 6 forks source link

Debug builds crash on start #38

Closed andy5995 closed 2 years ago

andy5995 commented 3 years ago

If using a debug build, ./modemu2k crashes when starting

$ ./modemu2k
modemu2k 0.0.999
Enter 'at%q' to quit

Segmentation fault (core dumped)
#0  0x0000555555557a07 in flexYyInput (buf=0x55555556a9c0 "", maxsize=8192) at ../src/cmdlex.l:39
#1  0x00005555555594bd in yy_get_next_buffer () at src/cmdlex.c:1367
#2  0x000055555555900c in yylex () at src/cmdlex.c:1207
#3  0x000055555555a582 in cmdLex (p=0x5e00000001 <error: Cannot access memory at address 0x5e00000001>)
    at ../src/cmdlex.l:151
#4  0x000055555555a5e0 in atcmdInit (cmdarg=0x7fffffffe060) at ../src/atcmd.c:64
#5  0x000055555555791c in main (argc=1, argv=0x7fffffffe2a8) at ../src/modemu2k.c:748
andy5995 commented 2 years ago

I can't reproduce this anymore when using

gcc (GCC) 11.2.0 in a Slackware 15.0 docker container gcc (GCC) 12.1.0 on Manjaro 21.3.6