Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005945OCamlOCaml runtime systempublic2013-03-12 17:232013-07-17 13:51
Reporterbvaugon 
Assigned Todoligez 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version4.00.1 
Target Version4.01.0+devFixed in Version4.01.0+dev 
Summary0005945: Mix-up of Minor_heap_min and Minor_heap_max units
DescriptionIn the OCaml runtime, the contants representing the minor heap bounds Minor_heap_min and Minor_heap_max are sometimes used as byte number and sometimes as word number.

The comments near declarations of these constants (from config.h) tells that Minor_heap_* should be word numbers.

The attached patch fixes this problem.
Steps To ReproduceThis problem can be observed in two different ways:

1/ Break an assertion with a valid minor heap size initialization:

$ grep Minor_heap_max [OCAML_PATH]/byterun/config.h
#define Minor_heap_max (1 << 28)
$ ocamlc -use-runtime [OCAML_PATH]/byterun/ocamlrund hw.ml -o hw
$ CAMLRUNPARAM=s=200000000 ./hw
file minor_gc.d.c; line 82 ### Assertion failed: size <= Minor_heap_max

2/ Impossibility to dynamically change minor heap size to a valid value:

With the same Minor_heap_max (1 << 28) from config.h, run this OCaml program:

Gc.set { (Gc.get ()) with Gc.minor_heap_size = 200000000 };;
Printf.printf "%d\n" (Gc.get ()).Gc.minor_heap_size;;

-> 67108864
Additional InformationThis problem comes from gc_ctrl.c and minor_gc.c, see ocaml-4.00.1-minor-heap-sizes.diff.
TagsNo tags attached.
Attached Filesdiff file icon ocaml-4.00.1-minor-heap-sizes.diff [^] (1,380 bytes) 2013-03-12 17:23 [Show Content]

- Relationships

-  Notes
(0009798)
doligez (administrator)
2013-07-17 13:51

patch applied to 4.01 branch (rev 13899)

- Issue History
Date Modified Username Field Change
2013-03-12 17:23 bvaugon New Issue
2013-03-12 17:23 bvaugon File Added: ocaml-4.00.1-minor-heap-sizes.diff
2013-03-17 17:30 gasche Assigned To => doligez
2013-03-17 17:30 gasche Status new => assigned
2013-07-12 09:42 doligez Target Version => 4.01.0+dev
2013-07-17 13:51 doligez Note Added: 0009798
2013-07-17 13:51 doligez Status assigned => closed
2013-07-17 13:51 doligez Resolution open => fixed
2013-07-17 13:51 doligez Fixed in Version => 4.01.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker