You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5945 Reporter: bvaugon Assigned to:@damiendoligez Status: closed (set by @damiendoligez on 2013-07-17T11:51:30Z) Resolution: fixed Priority: normal Severity: minor Version: 4.00.1 Target version: 4.01.0+dev Fixed in version: 4.01.0+dev Category: runtime system and C interface Monitored by:@gasche
Bug description
In 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 reproduce
This problem can be observed in two different ways:
1/ Break an assertion with a valid minor heap size initialization:
Original bug ID: 5945
Reporter: bvaugon
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2013-07-17T11:51:30Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.00.1
Target version: 4.01.0+dev
Fixed in version: 4.01.0+dev
Category: runtime system and C interface
Monitored by: @gasche
Bug description
In 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 reproduce
This 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 information
This problem comes from gc_ctrl.c and minor_gc.c, see ocaml-4.00.1-minor-heap-sizes.diff.
File attachments
The text was updated successfully, but these errors were encountered: