Mantis - Squeak
Viewing Issue Advanced Details
7610 VM crash always 03-06-11 23:30 05-17-11 00:24
lewis  
lewis  
normal  
resolved  
fixed  
none    
none  
0007610: Serial plugin crash on unix if too if too man opens are performed
Reported by Markus Lampert with fix provided:
http://lists.squeakfoundation.org/pipermail/vm-dev/2011-March/006970.html [^]

The serial plugin for unix (4.4.7.2357) can take the vm down. The following code demonstrates the issue:

s := SerialPort new.
40 timesRepeat: [
    s openPort: '/dev/ttyS0'.
    s close]
Fix provided by Markus Lampert (attached)

"I have attached a version of sqUnixSerial.c which fixes the problem. It allows
for 32 _different_ serial ports to be opened and closed (as often as necessary).

It also prevents the segmentation fault. If more than 32 different serial ports
are attempted to be opened the request fails.

The changes are in line 202, and 220 - 352.

In the current implementation (trunk) it is not possible to find out if
#openPort: was successful or not and I don't know how to fix that."
 sqUnixSerial.c [^] (13,178 bytes) 03-06-11 23:30

Notes
(0014109)
lewis   
05-17-11 00:24   
Fixed in SVN 2364 (trunk platforms/unix/plugins/SerialPlugin/sqUnixSerial.c updated March 2011)