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

Out_of_memory with CVS-snapshot #8382

Closed
vicuna opened this issue Nov 23, 2003 · 2 comments
Closed

Out_of_memory with CVS-snapshot #8382

vicuna opened this issue Nov 23, 2003 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 23, 2003

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

Bug description

Hello,

I have just discovered that some program that used to work fine up to
(including) OCaml 3.07+2 doesn't work with the most recent CVS-snapshot
3.07+5 (2003-11-19). It suddenly raises the exception Out_of_memory for
no apparent reason.

The backtrace yields the following:

Fatal error: exception Out_of_memory
Raised by primitive operation at file "format.ml", line 1000, character 4
Called from file "format.ml", line 1000, character 4
Called from file "format.ml", line 994, character 4
Called from file "list.ml", line 74, character 34
Called from file "format.ml", line 994, character 4
Called from file "list.ml", line 74, character 34
Called from file "format.ml", line 1000, character 4
Called from file "format.ml", line 1000, character 4
Called from file "sym_reg_gen.ml", line 11, character 35

The GC-status after the last full major cycle looks as follows (in case
this helps):

minor_words: 32768
promoted_words: 4094
major_words: 7149
minor_collections: 1
major_collections: 0
heap_words: 61440
heap_chunks: 1
top_heap_words: 61440
live_words: 7149
live_blocks: 1248
free_words: 54291
free_blocks: 1
largest_free: 54291
fragments: 0
compactions: 0

It would be a bit tedious to narrow down the size of the program,
but since there are not too many changes between the two CVS-states,
I hope that this is sufficient to find the problem.

Best regards,
Markus

--
Markus Mottl http://www.oefai.at/~markus markus@oefai.at

@vicuna
Copy link
Author

vicuna commented Nov 24, 2003

Comment author: administrator

Dear Markus,

I have just discovered that some program that used to work fine up to
(including) OCaml 3.07+2 doesn't work with the most recent CVS-snapshot
3.07+5 (2003-11-19). It suddenly raises the exception Out_of_memory for
no apparent reason.

The change in the CVS most likely to cause this behavior is a
modification in the polymorphic comparison operators (=, <, etc):
in order to correct their behavior w.r.t. float NaNs, they now perform
a full traversal of their arguments. This means that they will loop
or raise Out_of_memory when given cyclic arguments, while the old
implementation may loop or raise Out_of_memory, but could also stop
early on an == situation.

The backtrace yields the following:

Fatal error: exception Out_of_memory
Raised by primitive operation at file "format.ml", line 1000, character 4
Called from file "format.ml", line 1000, character 4
Called from file "format.ml", line 994, character 4
Called from file "list.ml", line 74, character 34
Called from file "format.ml", line 994, character 4
Called from file "list.ml", line 74, character 34
Called from file "format.ml", line 1000, character 4
Called from file "format.ml", line 1000, character 4
Called from file "sym_reg_gen.ml", line 11, character 35

The backtrace is a bit incomplete (and I'll have to understand why),
but could you please look at file "sym_reg_gen.ml" circa line 11 and
see whether there would be a call to a polymorphic comparison on a
potentially cyclic argument nearby?

If you can't find any, I'm willing to investigate the problem. No
need to shrink your example: just send me a complete repro case, no
matter how big.

Thanks for your testing,

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Jan 9, 2004

Comment author: administrator

Polymorphic comparison applied to cyclic value. (Confirmed by Markus.)

@vicuna vicuna closed this as completed Jan 9, 2004
@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