Message: previous - next
Month: November 2010

Seg fault with select using iolist reference

From: Chris Kukuchka <chrisk@...>
Date: Mon, 01 Nov 2010 13:47:03 -0600

We stumbled across a strange segmentation fault problem.  From what I 
can see, it has been around for a while.  More than likely because a 
bunch of things need to come into alignment to cause the problem.

I have confirmed these steps cause at minimum a nonsensical error 81 and 
at worst segmentation faults in various RedHat versions of Providex and 
PvxPlus between versions 6.30 and 9.10.  In Windows, I have not been 
able to produce a segmentation fault.  However, I have seen the error 81's.

To reproduce, create this program (substitute c:\ for /tmp/ on Windows):

0010 begin
0020 MY_IOL: iolist f$
0030 MY_IOL2: iolist x$
0040 open (hfn)"/tmp/"; chan2=lfo
0050 select iol=MY_IOL from "/tmp/"
0060 i+=1; if mod(i,50)=3 then escape
0070 read (chan2)iol=MY_IOL2
0080 read (chan2)iol=MY_IOL2
0090 next record

Then follow these steps:

1) Save the program
2) Restart the Providex session
3) Load the program
4) Run the program (it should escape at line 60)
5) Add this line to the program

75 escape

6) Single step or run until you execute line 90

Once line 90 is executed, you will either encounter an error 81 (Invalid 
IOLIST specification) or a Segmentation fault.

I did not test any other platforms beyond Windows and RedHat ES3.  We 
have already adjusted our initial program to work around the problem, so 
we do not need suggestions on how to get our program to run.  However, 
it would be nice to have this added to the list of things to fix in 
future releases.


Chris Kukuchka
Sequoia Group, Inc.