Closed djs55 closed 10 years ago
I'll propose a few bounds-checking unit tests and some fixes.
I completely agree with you.
On 10 Dec 2013, at 15:58, Dave Scott notifications@github.com wrote:
I think that, if we're going to bounds-check at all, we should check everything and be safe. I've just noticed a higher-level library [johnelse/ocaml-crc] which is applying its own bounds checks at the layer above -- I'd like to eliminate those by making the lower-level safe. Does that sound sensible?
OK, in the middle of adding some unit tests!
On Tue, Dec 10, 2013 at 6:28 PM, Anil Madhavapeddy <notifications@github.com
wrote:
I completely agree with you.
On 10 Dec 2013, at 15:58, Dave Scott notifications@github.com wrote:
I think that, if we're going to bounds-check at all, we should check everything and be safe. I've just noticed a higher-level library [johnelse/ocaml-crc] which is applying its own bounds checks at the layer above -- I'd like to eliminate those by making the lower-level safe. Does that sound sensible?
— Reply to this email directly or view it on GitHubhttps://github.com/mirage/ocaml-cstruct/issues/20#issuecomment-30254067 .
Dave Scott
test driven agile development; this feels so grown up.
On 10 Dec 2013, at 18:29, Dave Scott notifications@github.com wrote:
OK, in the middle of adding some unit tests!
On Tue, Dec 10, 2013 at 6:28 PM, Anil Madhavapeddy <notifications@github.com
wrote:
I completely agree with you.
On 10 Dec 2013, at 15:58, Dave Scott notifications@github.com wrote:
I think that, if we're going to bounds-check at all, we should check everything and be safe. I've just noticed a higher-level library [johnelse/ocaml-crc] which is applying its own bounds checks at the layer above -- I'd like to eliminate those by making the lower-level safe. Does that sound sensible?
— Reply to this email directly or view it on GitHubhttps://github.com/mirage/ocaml-cstruct/issues/20#issuecomment-30254067 .
Dave Scott — Reply to this email directly or view it on GitHub.
fixed in 1.x
The bounds checking currently looks like:
I've screwed-up a number of times by getting a -ve offset and/or length. Nothing good happens in this state :)
I think that, if we're going to bounds-check at all, we should check everything and be safe. I've just noticed a higher-level library [johnelse/ocaml-crc] which is applying its own bounds checks at the layer above -- I'd like to eliminate those by making the lower-level safe. Does that sound sensible?