Re: [Chicken-hackers] [PATCH] alist-update: don't segfault on non-list

2013-06-06 Thread Peter Bex
On Thu, Mar 14, 2013 at 05:43:46AM +0100, Florian Zumbiehl wrote: Check the alist passed to alist-update is actually a pair before using ##sys#slot on it. This one almost slipped through the cracks. It's a trivial change, so I decided that a second signoff is not neccessary, and pushed it

Re: [Chicken-hackers] [PATCH] alist-update: don't segfault on non-list

2013-03-17 Thread Christian Kellermann
* Jim Ursetto zbignie...@gmail.com [130316 23:55]: I don't believe that will work; the list check must be done inside the loop. Otherwise this will crash: True. -- In the world, there is nothing more submissive and weak than water. Yet for attacking that which is hard and strong, nothing can

Re: [Chicken-hackers] [PATCH] alist-update: don't segfault on non-list

2013-03-16 Thread Jim Ursetto
I don't believe that will work; the list check must be done inside the loop. Otherwise this will crash: (alist-update 'foo 'bar '((a . b) . 3)) This should also be true for alist-update! as well (i.e. replace (and (pair? lst) ...) with ##sys#check) or the one I showed below won't error out:

Re: [Chicken-hackers] [PATCH] alist-update: don't segfault on non-list

2013-03-14 Thread Jim Ursetto
Nice catch. Actually, it might be better rewritten with (##sys#check-list lst 'alist-update), although that is not that important. Related, alist-update! behaves weird but doesn't crash on non-alists: (alist-update! 'foo 'bar 3) ;= ((foo . bar) . 3) And it's inconsistent when you give it a