Subj : Debugging MakeNL To : All From : andrew clarke Date : Fri Jul 27 2018 01:25:02 This month I finally managed to get a usable installation of eComStation running under VirtualBox in Linux. It's amazing how many old installers want to modify CONFIG.SYS which causes OS/2 to become unbootable due to system DLL version mismatches, etc. The VirtualBox Additions work well, so I can copy & paste between Linux and OS/2 using the shared clipboard. Very cool. Also I finally worked out how to connect OS/2 to a Samba share. Anyway, I've ported MakeNL to IBM VisualAge for OS/2 and in the process managed to code a workaround for the crash in the Watcom OS/2 version. See the recent CVS commits. I suspect I've just hidden the problem though. Probably related, I'm seeing segfaults with the EMX version: [c:\src\makenl\src]del outfile\testnet.242 Deleting C:\src\makenl\src\outfile\testnet.242 1 file deleted 1,024 bytes freed [c:\src\makenl\src]makenl.exe MakeNL 3.3.6 (EMX) compiled with GNU C on Aug 24 2013 01:04:51 MakeNL started Cmdline: C:\src\makenl\src\makenl.exe Using 'makenl.ctl' in 'C:\src\makenl\src' Begin processing 'testnet.' -- 1:11, Saturday, August 24, 2013 Process terminated by SIGSEGV core dumped [c:\src\makenl\src]del outfile\testnet.242 Deleting C:\src\makenl\src\outfile\testnet.242 1 file deleted 1,024 bytes freed [c:\src\makenl\src]gdb makenl.exe GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 4.16 (emx), Copyright 1996 Free Software Foundation, Inc... Starting program: c:/src/makenl/src/makenl.exe [New thread 1] Program received signal SIGSEGV, Segmentation fault. [Switching to thread 1] Program received signal SIGSEGV, Segmentation fault. 0x1e989 in closedir () (gdb) bt #0 0x1e989 in closedir () #1 0x19d93 in os_findfirst (pff=0x283f64c, path=0x36b58 "200", mask=0x283f54c "*.msg") at osgnufnd.c:36 #2 0x18c78 in SearchMaxMSG (path=0x36b58 "200") at msgtool.c:86 #3 0x1912c in OpenMSGFile (address=0x3600c, filename=0x335f0 "C:\\src\\makenl\\src\\outfile\\testnet.242") at msgtool.c:167 #4 0x16d14 in main (argc=1, argv=0x283ffd0) at makenl.c:329 [c:\src\makenl\src]grep -n SearchMaxMSG *.c | grep :167 msgtool.c:167: MSGnum = SearchMaxMSG(MessageDir); Clearly another part of the code is corrupting MessageDir. I saw this bug in the Turbo C (DOS) version too a few weeks back, but there's obviously no memory protection there, so I wasn't sure how to begin to debug it. Anyway, progress. :-) --- GoldED+/BSD 1.1.5-b20110223-b20110223 * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267) .