[postmodern-devel] bug in the array interpreter
Nicolas Martyanoff
khaelin at gmail.com
Sun Apr 24 23:58:53 UTC 2011
I think I found a pretty nasty bug; the array parser loop foreven on
empty arrays, eating all the RAM it can.
Triggering it is really simple, just select an empty array.
The effect is directly visible with:
(funcall (cl-postgres::read-array-value #'parse-integer) "{}")
I think there's something wrong in the following sexp in
READ-ARRAY-VALUE:
(loop :for x := arr :then (car x) :while (listp x) :collect (length x))
If ARR is nil, it loops forever since both (listp nil) and (car nil)
yield t.
I'm not sure I understand how the code works for multi-dimensional
arrays, so I'd prefer not to break something trying a fix; would you
mind fix it ?
Thank you.
Best regards,
--
Nicolas Martyanoff
http://codemore.org
khaelin at gmail.com
More information about the postmodern-devel
mailing list