NL crash on Matrix op

Q&A's, tips, howto's

NL crash on Matrix op

Postby hds1 » Wed Feb 11, 2015 2:01 pm

Hi,

just stumbled upon crashes of newlisp 10.6.2 on not possible Matrix ops.
Code: Select all
>(set 'A '((1 2 3) (4 5 6)))
>(det A 1e-10)

--> Speicherzugriffsfehler (Speicherabzug geschrieben)
(Memory acces error) and NL crashes. Happens with or without pivot and also on (mat ...) ops.
Code: Select all
> (set 'B '((-1 1 1) (1 4 -5) (1 -2 0)))
> (set 'A '((1 2 3) (4 5 6)))
> (mat + B A)

--> same error as above.
I would expect NL not to crash but throw an error signal if Matrix dimensions are wrong.

If it is intended behaviour could you pls put a note in the docs that the user has to check proper dimensions before any Matrix op ?
Or do i miss something basic here .... ?

Heiko
Kernel 3.13.0-45-generic, Kubuntu 14.04 64bit, newLISP v.10.6.2 64-bit on Linux IPv4/6 UTF-8 libffi.
Compiled from tgz.
hds1
 
Posts: 27
Joined: Thu Mar 20, 2014 5:02 pm

Re: NL crash on Matrix op

Postby Lutz » Wed Feb 11, 2015 2:33 pm

This seems to be limited to the UBUNTU version only. On my UBUNTU 14.04 64-bit the first example also crashes. But other OS are ok:

Code: Select all
newLISP v.10.6.2 64-bit on OSX IPv4/6 UTF-8 libffi, options: newlisp -h

> (set 'A '((1 2 3) (4 5 6)))
((1 2 3) (4 5 6))
> (det A 1e-10)

ERR: wrong dimensions in function det : A
> (set 'B '((-1 1 1) (1 4 -5) (1 -2 0)))
((-1 1 1) (1 4 -5) (1 -2 0))
> (set 'A '((1 2 3) (4 5 6)))
((1 2 3) (4 5 6))
> (mat + B A)

ERR: wrong dimensions in function mat
>


it also works fine on FreeBSD and Windows. Will investigate for UBUNTU.
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: NL crash on Matrix op

Postby Lutz » Wed Feb 11, 2015 6:38 pm

The problem is fixed for 10.6.3 and both examples run now fine on UBUNTU Linux 14.04 64-bit.

Changes also tested on OSX 64-bit, OpenBSD 64-bit, FreeBSD 64-bit and Windows 32-bit.

http://www.newlisp.org/downloads/develo ... nprogress/
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: NL crash on Matrix op

Postby hds1 » Wed Feb 11, 2015 7:18 pm

great. thanks.

Regards
Heiko
hds1
 
Posts: 27
Joined: Thu Mar 20, 2014 5:02 pm


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 2 guests