happens across ubuntu 3.1.1.1-1, mercurial v3.1.4.1 and tip
heres what valgrind thinks:
$ valgrind /home/kook/picolisp/bin/picolisp /home/kook/picolisp/lib.l
@ext.l ./html.l +
==32498== Memcheck, a memory error detector
==32498== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==32498== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==32498== Command: /home/kook/picolisp/bin/picolisp
/home/kook/picolisp/lib.l @ext.l ./html.l +
==32498==
"1" "1" T
"FUCK"
"arst2" "arst2" T
"FUCK"
"Ssts3" "Ssts3" T
"FUCK"
"=s1=" "=s1=" NIL
"FUCK"
==32498== Invalid read of size 4
==32498== at 0x8078EAE: outNum (io.c:2374)
==32498== by 0x80512EB: evList (main.c:867)
==32498== by 0x80552FF: doMapcar (apply.c:292)
==32498== by 0x80512EB: evList (main.c:867)
==32498== by 0x805130F: evList (main.c:869)
==32498== by 0x407D934: (below main) (libc-start.c:260)
==32498== Address 0xe75a0428 is not stack'd, malloc'd or (recently) free'd
==32498==
sorry its not a minimal testcase, but heres the code (html.l):
(de in_range (A X B)
(and (>= X A) (<= X B)))
(de is_alphanumeric_letter (L)
(or (in_range "a" L "z") #<=
(in_range "A" L "Z")
(in_range "0" L "9")))
(de is_alphanumeric_string (S)
(not (find '((C) (not (is_alphanumeric_letter C))) (chop S))))
(de test_is_alphanumeric_string ()
(mapcar
'((P)
(let (X (car P) Y (cdar P))
(println X Y (is_alphanumeric_string X))
(or
(== Y (is_alphanumeric_string X))
(println "FUCK")
)
)
)
'(("1" T) ("arst2" T) ("Ssts3" T) ("=s1=" F) (4 T) (banana F))
)
)
(test_is_alphanumeric_string)
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe