summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2000-03-30 17:33:43 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2000-03-30 17:33:43 +0000
commita64b49e9a380ff433b218525f83a0c314a8438cd (patch)
tree2603e9302432031eeb1ea7c1fdb5023ab2449458
parentb20fb9e8fcbca65da5de0e610f0090e4abc627ab (diff)
Bug dans le fix precedent (PR#61)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3022 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--byterun/obj.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/byterun/obj.c b/byterun/obj.c
index f35fcf503..24846f2e2 100644
--- a/byterun/obj.c
+++ b/byterun/obj.c
@@ -108,7 +108,9 @@ value obj_truncate (value v, value newsize) /* ML */
/* PR#61: since we're about to lose our references to the elements
beyond new_wosize in v, erase them explicitly so that the GC
can darken them as appropriate. */
- for (i = new_wosize; i < wosize; i++) modify(&Field(v, i), Val_unit);
+ if (tag < No_scan_tag) {
+ for (i = new_wosize; i < wosize; i++) modify(&Field(v, i), Val_unit);
+ }
Field (v, new_wosize) =
Make_header (Wosize_whsize (wosize-new_wosize), 0, Caml_white);
Hd_val (v) = Make_header (new_wosize, tag, color);