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
structural equality for cyclic data structure cannot be interrupted #3921
Comments
Comment author: @damiendoligez Maybe we could poll for signals, but there are subtleties. |
Comment author: @stedolan I think a reasonable way to implement polling would be to abort the comparison if a signal is detected (i.e. return from compare_val and free the compare stack if necessary), then handle the signal and restart the comparison from the beginning. Trying to keep the compare stack alive across a signal handler sounds like much more trouble than it's worth. We'll probably need to fix this for multicore, at least: a single thread diverging shouldn't prevent others from making progress, and we rely on the signal-polling mechanism to synchronise GC. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Reopening this, now that we have a PR that will close it... |
Original bug ID: 3921
Reporter: sumii
Status: acknowledged (set by @damiendoligez on 2005-12-15T12:20:27Z)
Resolution: open
Priority: low
Severity: feature
Version: 3.09.0
Category: standard library
Related to: #7502 #7524
Bug description
In the interactive toplevel of ocaml, the "infinite loop"
let rec x = 1 :: x in x = x
cannot be interrupted by Ctrl-C despite the following paragraph in
Chapter 9 of the manual:
The problem reproduces on any UNIX system to which I have access.
See also: http://caml.inria.fr/pub/ml-archives/caml-list/2005/12/c270081cc11641447bc76557d0f1dabe.en.html
By the way, the behavior of not checking == first in = seems to have been adopted in recent versions of ocaml, but its implications are not quite well-documented in the "Changes" file (though the manual seems to be up to date).
The text was updated successfully, but these errors were encountered: