|Anonymous | Login | Signup for a new account||2017-11-24 17:28 CET|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003921||OCaml||standard library||public||2005-12-13 05:09||2017-05-02 12:07|
|Target Version||Fixed in Version|
|Summary||0003921: structural equality for cyclic data structure cannot be interrupted|
|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:
> At any point, the parsing, compilation or evaluation of the current
> phrase can be interrupted by pressing ctrl-C (or, more precisely, by
> sending the INTR signal to the ocaml process). The toplevel then
> immediately returns to the # prompt.
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).
|Tags||No tags attached.|
Maybe we could poll for signals, but there are subtleties.
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.
|2005-12-13 05:09||sumii||New Issue|
|2005-12-15 13:20||doligez||Note Added: 0003439|
|2005-12-15 13:20||doligez||Priority||normal => low|
|2005-12-15 13:20||doligez||Severity||minor => feature|
|2005-12-15 13:20||doligez||Status||new => acknowledged|
|2016-12-09 08:34||shinwell||Category||Incoming => OCaml general|
|2017-02-23 16:36||doligez||Category||OCaml general => -OCaml general|
|2017-03-03 17:15||doligez||Category||-OCaml general => standard library|
|2017-03-08 15:23||stedolan||Note Added: 0017601|
|2017-03-09 10:40||octachron||Relationship added||related to 0007502|
|2017-05-02 12:07||dra||Relationship added||related to 0007524|
|Copyright © 2000 - 2011 MantisBT Group|