#1888 'linel' command can crash 'maxima'

closed
nobody
5
2010-02-01
2010-01-31
Sergei
No

I am new to 'maxima'. As I understand it, 'linel' is supposed to change assumed terminal length -> change wrapping of displayed lines.

Here is an example of scree session which crashes 'maxima':

"
/mnt/sdb8/sergei/AFSWD_debug/install/rlwrap-0.36/binsh/rlwrap -D -A /mnt/sdb8/sergei/AFSWD_debug/install/maxima-5.20.1/binsh/maxima
Maxima 5.20.1 http://maxima.sourceforge.net
using Lisp SBCL 1.0.34
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) linel: 200000000;
Heap exhausted during garbage collection: 0 bytes available, 8 requested.
Gen StaPg UbSta LaSta LUbSt Boxed Unboxed LB LUB !move Alloc Waste Trig WP GCs Mem-age
0: 0 0 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000
1: 0 0 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000
2: 112602 0 0 0 74809 10 0 0 0 306433880 24744 2000000 0 0 1.0145
3: 0 0 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000
4: 0 0 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000
5: 0 0 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000
6: 0 0 0 0 11071 2106 0 0 0 53972992 0 2000000 10995 0 0.0000
Total bytes allocated = 536821152
Dynamic-space-size bytes = 536870912
GC control variables:
*GC-INHIBIT* = true
*GC-PENDING* = in progress
*STOP-FOR-GC-PENDING* = false
fatal error encountered in SBCL pid 19049(tid 3085022912):
Heap exhausted, game over.

Welcome to LDB, a low-level debugger for the Lisp runtime environment.
ldb>
".

In my opinion changing line length is a simple operation and shouldn't crash a tool.

Discussion

  • Dieter Kaiser

    Dieter Kaiser - 2010-01-31
    • status: open --> pending
     
  • Dieter Kaiser

    Dieter Kaiser - 2010-01-31

    Yes, linel is the assumed width (in characters) of the console display (See the manual or type ? linel to get the documentation).

    The default value is 79. Perhaps a value of 100 or 200 might be useful for your display too.
    But I can not imagine that a value of 2*10^8 is useful. I think it is a curiosity to try such a huge value.

    Closing this bug report as "wont fix".
    Dieter Kaiser

     
  • Sergei

    Sergei - 2010-02-01
    • status: pending --> open
     
  • Sergei

    Sergei - 2010-02-01

    In any normal language/tool just _setting_ line length _without_ _using_ the setting should crash the tool. The fact that just _setting_ line length crashes the tool tells that something is implemented in a terribly wrong manner inside the tool.

     
  • Raymond Toy

    Raymond Toy - 2010-02-01

    You are mistaken that maxima is not using the value. The value is set, and maxima wants to print out the value of linel now. Hence the new value is being used.

    I suppose it's possible to add a check that linel will be some reasonable value.

     
  • Sergei

    Sergei - 2010-02-01

    Regarding "You are mistaken that maxima is not using the value" - now that I was explained in another bug report of mine about 2d display and centering by default, I understand that the value is used. And altogether the _defaults_ (i.e. default use of 2d display/centering) are of poor choice.

    I was very much surprised how quickly I managed to crash 'maxima' just trying to adjust display settings. I would understand a crash due to lack of memory while processing a complex expression or, in general, solving a complex problem,

    A crash during adjustment of display settings simply undermines trust.

    If you can't change code, please at least update the documentation to clearly explain the likely limits and implications.

     
  • Dieter Kaiser

    Dieter Kaiser - 2010-02-01

    The reported issue has been fixed in mlisp.lisp revision 1,84.
    linel can have integer values from 1 to 10000.
    Closing this bug report as fixed.
    Dieter Kaiser

     
  • Dieter Kaiser

    Dieter Kaiser - 2010-02-01
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks