[RPL/2] Interesting error

BERTRAND Joël joel.bertrand at systella.fr
Dim 9 Déc 17:02:09 CET 2007


Adrian Blake wrote:
> Try this
> 
> RPL/2> << >> 1 2 { 5 + 4 } exsub
> 
> RPL/2> help
> +++System : Memory allocation error
> *** glibc detected *** rpl: free(): invalid pointer: 0xb7bd1150 ***
> ======= Backtrace: =========
> /lib/i686/libc.so.6[0xb7afb4e6]
> /lib/i686/libc.so.6(cfree+0x90)[0xb7aff010]
> rpl(liberation+0x1dd)[0x807a8ed]
> rpl(rplinit+0x27eb)[0x8147f8b]
> rpl(main+0x2a)[0x8150bba]
> /lib/i686/libc.so.6(__libc_start_main+0xe0)[0xb7aa9f90]
> rpl[0x8061931]
> ======= Memory map: ========
> 08048000-082b2000 r-xp 00000000 08:05 412562     /usr/local/bin/rpl
> 082b2000-082bc000 rwxp 0026a000 08:05 412562     /usr/local/bin/rpl
> 082bc000-08336000 rwxp 082bc000 00:00 0          [heap]
> b7500000-b7521000 rwxp b7500000 00:00 0
> b7521000-b7600000 ---p b7521000 00:00 0
> b7650000-b768f000 r-xp 00000000 08:05 417386     /usr/share/locale/UTF-8/LC_CTYPE
> b768f000-b7691000 rwxp b768f000 00:00 0
> b7691000-b7696000 r-xp 00000000 08:05 405361     /usr/lib/libXdmcp.so.6.0.0
> b7696000-b7697000 rwxp 00004000 08:05 405361     /usr/lib/libXdmcp.so.6.0.0
> 
> etc.
> 
> 
> Does anyone else get the same error ??
> 
> After executing << >> 1 2 { 5 + 4 } exsub, try something else, same error?
> 
> Put the line in an executable file and run, same error ?

	Yes, there is a bug. You cannot write << >> 1 2 { 5 + 4 } exsub because 
a expression must start with '<<' and stop with '>>'. You have to write :

RPL/2> << RELAX >> 2 2 { 5 + 4 } exsub

1: << 5 + 4 >>
RPL/2>

	I will fix this mistake as soon as possible. Thanks for report,

	JKB


Plus d'informations sur la liste de diffusion RPL2