MantisBT - OCaml
View Issue Details
0006361OCamlstandard librarypublic2014-04-03 23:392015-12-11 19:26
lpw25 
 
normalminoralways
closedfixed 
4.01.0 
4.02.0+dev 
0006361: Hashtbl.hash does not terminate on recursive lazy value
The generic hash function does not terminate on this recursive lazy value:

            OCaml version 4.01.0
    
    # #rectypes;;
    # #print_length 4;;
    # let rec x = lazy x;;
    val x : 'a lazy_t as 'a = lazy (lazy (lazy (lazy ...)))
    # Hashtbl.hash x;;
No tags attached.
Issue History
2014-04-03 23:39lpw25New Issue
2014-04-26 19:12xleroyNote Added: 0011328
2014-04-26 19:12xleroyStatusnew => resolved
2014-04-26 19:12xleroyResolutionopen => fixed
2014-04-26 19:12xleroyFixed in Version => 4.02.0+dev
2014-05-12 13:51frischNote Added: 0011429
2015-12-11 19:26xleroyStatusresolved => closed
2017-02-23 16:43doligezCategoryOCaml standard library => standard library

Notes
(0011328)
xleroy   
2014-04-26 19:12   
Nasty example. Fixed in commit 14693.
(0011429)
frisch   
2014-05-12 13:51   
An unfortunate consequence of the fix is that a GC (which short-circuits forward pointers) run can change the hash value (of already forced lazy values).