Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007170OCaml~DO NOT USE (was: OCaml general)public2016-03-09 10:242017-09-24 17:32
Reporterkayceesrk 
Assigned Tofrisch 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version4.02.3 
Target Version4.03.0+dev / +beta1Fixed in Version4.03.0+dev / +beta1 
Summary0007170: ocamlopt.opt fails with Index out of bounds error when compiling empty external value
DescriptionCompiling the program

external foo : 'a = ""

crashes ocamlopt.opt with Fatal error: exception Invalid_argument("index out of bounds"). The bug was found by fuzzing afl-instrumented ocamlopt.opt.


Steps To Reproduce$ cat test.ml
external foo : 'a = ""
$ ocamlopt.opt test.ml
Fatal error: exception Invalid_argument("index out of bounds")
$ OCAMLRUNPARAM="b" ocamlopt.opt test.ml
Fatal error: exception Invalid_argument("index out of bounds")
Called from file "arg.ml", line 214, characters 2-73
Tagsafl
Attached Files

- Relationships

-  Notes
(0015496)
frisch (developer)
2016-03-14 16:51
edited on: 2016-03-14 17:01

I cannot reproduce the error with 4.03; I now get:

Error: External identifiers must be functions

This was apparently fixed by https://github.com/ocaml/ocaml/commit/77bc51fb821a89f4835d3d61b3ec28bdb37e3854 [^] (" Avoid an index-out-of-bound fatal error when the primitive name is empty").


- Issue History
Date Modified Username Field Change
2016-03-09 10:24 kayceesrk New Issue
2016-03-09 10:24 kayceesrk Tag Attached: afl
2016-03-14 14:40 doligez Note Added: 0015494
2016-03-14 14:40 doligez Severity crash => major
2016-03-14 14:40 doligez Status new => acknowledged
2016-03-14 14:40 doligez Target Version => 4.03.0+dev / +beta1
2016-03-14 14:40 doligez Note Deleted: 0015494
2016-03-14 16:51 frisch Note Added: 0015496
2016-03-14 17:01 frisch Note Edited: 0015496 View Revisions
2016-03-14 17:01 frisch Status acknowledged => resolved
2016-03-14 17:01 frisch Fixed in Version => 4.03.0+dev / +beta1
2016-03-14 17:01 frisch Resolution open => fixed
2016-03-14 17:01 frisch Assigned To => frisch
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)
2017-09-24 17:32 xleroy Status resolved => closed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker