chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Raise error on construction of too large v


From: Christian Kellermann
Subject: Re: [Chicken-hackers] [PATCH] Raise error on construction of too large vectors/blobs
Date: Mon, 5 Mar 2012 14:36:28 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

* felix winkelmann <address@hidden> [120305 13:56]:
> From: Christian Kellermann <address@hidden>
> Subject: Re: [Chicken-hackers] [PATCH] Raise error on construction of too 
> large vectors/blobs
> Date: Mon, 5 Mar 2012 13:47:32 +0100
> 
> > * felix winkelmann <address@hidden> [120305 13:41]:
> >> Hi!
> >> 
> >> I wonder if it is a good idea to test vector limits by allocating a
> >> vector of #x100000000000000 elements.
> > 
> > The rationale behind this is:
> > 
> > It should not allocate anything but raise an error. If it does it
> > will exhaust memory and that is also an error, resulting in a panic.
> > 
> > Does that make sense? I just want to make sure that the error is caught...
> > Maybe there is a better way?
> 
> Ah, you check for an error. An oversight on my part. Well, you could try
> negative lengths and so on.

Ah but you made me look at the tests again and that caught a
copy'n'paste error. Narf, how many iterations do I need to get this
simple thing right...

Attached yet another version...

Sorry for the oversight.

-- 
Who can (make) the muddy water (clear)? Let it be still, and it will
gradually become clear. Who can secure the condition of rest? Let
movement go on, and the condition of rest will gradually arise.
 -- Lao Tse. 

Attachment: 0001-Raise-error-on-construction-of-too-large-vectors-blo.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]