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

Strange interaction of classes and modules #6448

Closed
vicuna opened this issue Jun 3, 2014 · 2 comments
Closed

Strange interaction of classes and modules #6448

vicuna opened this issue Jun 3, 2014 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Jun 3, 2014

Original bug ID: 6448
Reporter: gerd
Assigned to: @damiendoligez
Status: resolved (set by @damiendoligez on 2016-04-05T14:03:56Z)
Resolution: suspended
Severity: minor
Version: 4.00.1
Category: back end (clambda to assembly)
Monitored by: @gasche

Bug description

The attached program bug.ml outputs different numbers on different runs (for 3.12.1, 4.00.1 but not 4.01.0):

RUN 1
r=0
r=1
r=2
RUN 2
r=0
r=3
r=4

However, there is no mutable state outside RES, and both runs should produce identical numbers.

It looks like as if the old instance of the module RES is cached while building the class. The double definition of U (in Genutil) is also crucial for triggering the bug.

In 4.01.0 the program works as expected; nevertheless I'm reporting the issue because it is so strange, and there is the chance that the bug is now only better hidden. At least I could not find anything in the Changes file or in Mantis that could explain the misbehavior.

File attachments

@vicuna
Copy link
Author

vicuna commented Jun 3, 2014

Comment author: @alainfrisch

This reminds me of #4776, although there is no exception here. It also remind me of another more recent problem, but I cannot find the reference.

@vicuna
Copy link
Author

vicuna commented Apr 5, 2016

Comment author: @damiendoligez

How I wish we had time to investigate this kind of report...

No repro on 4.02.3 and 4.03, so the bug seems to be gone for good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants