Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gc.get () returns invalid (untagged) integer #3306

Closed
vicuna opened this issue Apr 19, 2002 · 2 comments
Closed

Gc.get () returns invalid (untagged) integer #3306

vicuna opened this issue Apr 19, 2002 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Apr 19, 2002

Original bug ID: 1116
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Yutaka Oiwa
Version: 3.04
OS: Linux
Submission from: h135-162.tokyu-net.catv.ne.jp (210.149.135.162)

Gc.get () returns invalid untagged integers for some fields.

% ocaml;;
Objective Caml version 3.04

let v = Gc.get ();;

val v : Gc.control =
{Gc.minor_heap_size = 32768; Gc.major_heap_increment = 63488;
Gc.space_overhead = 42; Gc.verbose = 0; Gc.max_overhead = 1000000;
Gc.stack_limit = 262144}

v.Gc.minor_heap_size * 2 / 2 = v.Gc.minor_heap_size;;

  • : bool = false (* should be true *)

Obj.is_block (Obj.field (Obj.repr v) 0);;

  • : bool = true (* should be false *)

byterun/gc_ctrl.c:276:
Store_field (res, 0, Wsize_bsize (Val_long (minor_heap_size))); /* s /
Store_field (res, 1, Wsize_bsize (Val_long (major_heap_increment))); /
i */

This should be Val_long (Wsize_bsize (...)).
The file asmrun/gc_ctrl.c contains the same code.

@vicuna
Copy link
Author

vicuna commented Apr 22, 2002

Comment author: administrator

Full_Name: Yutaka Oiwa

Gc.get () returns invalid untagged integers for some fields.

Oops, you're right. This is now fixed in the working version. Thank you
for the report.

-- Damien

@vicuna
Copy link
Author

vicuna commented Apr 26, 2002

Comment author: administrator

Fixed by DD 2002-04-22

@vicuna vicuna closed this as completed Apr 26, 2002
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant