diff options
author | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2008-01-28 05:29:20 +0000 |
---|---|---|
committer | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2008-01-28 05:29:20 +0000 |
commit | 3f4a98da0fbf8a87c674d6737d8c6cec7e8567e5 (patch) | |
tree | f5aa13505824d708414ece1f00219b811315c44a /byterun/weak.c | |
parent | 30f3fa2c5bc27f8c59930741aa1b6dd5a34a6b40 (diff) | |
download | ocaml-gcaml3090.tar.gz |
3.09.1 updategcaml3090
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml3090@8792 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/weak.c')
-rw-r--r-- | byterun/weak.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/byterun/weak.c b/byterun/weak.c index efd23c465d..0cea2a6dc3 100644 --- a/byterun/weak.c +++ b/byterun/weak.c @@ -19,6 +19,7 @@ #include "alloc.h" #include "fail.h" +#include "major_gc.h" #include "memory.h" #include "mlvalues.h" @@ -113,7 +114,11 @@ CAMLprim value caml_weak_get_copy (value ar, value n) if (Tag_val (v) < No_scan_tag){ mlsize_t i; for (i = 0; i < Wosize_val (v); i++){ - Modify (&Field (elt, i), Field (v, i)); + value f = Field (v, i); + if (caml_gc_phase == Phase_mark && Is_block (f) && Is_in_heap (f)){ + caml_darken (f, NULL); + } + Modify (&Field (elt, i), f); } }else{ memmove (Bp_val (elt), Bp_val (v), Bosize_val (v)); |