Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007795OCamlstandard librarypublic2018-05-13 14:342018-05-21 18:44
Reporterkayceesrk 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.08.0+dev 
Summary0007795: Weak.create should reject negative lengths
DescriptionWeak.create accepts -1 for the length. It should raise Invalid_argument for negative lengths. It appears that the bounds check in `caml_weak_create` is off by one.
Steps To Reproduce$ ocaml
        OCaml version 4.08.0+dev0-2018-04-09

# let v = Weak.create (-1);;
val v : '_weak1 Weak.t = <abstr>
# Weak.length v;;
- : int = -1
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0019113)
kayceesrk (reporter)
2018-05-13 16:45

I've opened https://github.com/ocaml/ocaml/pull/1782 [^] which fixes this bug.
(0019130)
xleroy (administrator)
2018-05-21 18:44

GPR was merged in trunk.

- Issue History
Date Modified Username Field Change
2018-05-13 14:34 kayceesrk New Issue
2018-05-13 16:45 kayceesrk Note Added: 0019113
2018-05-21 18:44 xleroy Note Added: 0019130
2018-05-21 18:44 xleroy Status new => resolved
2018-05-21 18:44 xleroy Resolution open => fixed
2018-05-21 18:44 xleroy Fixed in Version => 4.08.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker