SourceForge has been redesigned. Learn more.

#4 29. (7 Jan 2003) Array subscript out of bounds crashes popl


Bug reported by Luc Beaudoin

Many thanks to
Chris Glur

Waldek Hebisch

for pin-pointing the problem in $popsrc/aarith.s

Recapitulation: Luc Beaudoin pointed out that on PC
linux Poplog array
out of bounds errors caused poplog to crash. (It turns
out that I had
reported the same problem in March 1991!)

This should produce a mishap (INVALID ARRAY SUBSCRIPT)
and then continue
newarray([1 10])(11) =>

It worked on Solaris and Alpha Unix poplog, but crashed
poplog on
PC+linux poplog and also on PC+Windows poplog

In an earlier message I traced the problem to

but did not know what exactly to look for.

Chris located the suspect code and Waldek's answer told
me exactly what
to do to fix that file:

> Date: 7 Jan 2003 16:19:42 GMT
> Organization: Politechnika Wroclawska
> : when there are no subscript errors, _array_sub
exits via the
> : jmp *_PD_EXECUTE(%eax)
> : ELSE it gets to:
> : subl , %USP ;;; reveal the last
index again
> : call XC_LAB(weakref Sys$-Array$-Sub_error)
> ^^^^

Waldek wrote:
> jmp works OK
> <snip>

To rebuild your PC+Linux poplog system, do the
following (for which you
may need root privileges if your system was installed
as root):

cd $popsrc
edit aarith.s
call XC_LAB(weakref Sys$-Array$-Sub_error)
jmp XC_LAB(weakref Sys$-Array$-Sub_error)


  • Jeffrey T Best

    Jeffrey T Best - 2004-01-14
    • status: open --> open-fixed
  • Jeffrey T Best

    Jeffrey T Best - 2004-01-14
    • status: open-fixed --> closed-fixed

Log in to post a comment.