Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000238OCamlOCaml generalpublic2000-11-29 01:482000-11-30 18:14
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000238: serialization of custom objects
DescriptionFull_Name: Manuel Fahndrich
Version: 3.00
OS: Win2K
Submission from: tide72.microsoft.com (131.107.3.72)


I found two errors in the serialization code, one related to int64's in
particular, the other for all custom objects.

Bug 1:
  byterun/ints.c:282
  <
  *wsize_64 = *wsize_64 = 8;
  >
  *wsize_32 = *wsize_64 = 8;

The error causes the serialization to miscompute the size of the block to
allocate when reading the data back in.

Bug 2:
  byterun/intern.c:266
  >
  if (intern_obj_table != NULL) intern_obj_table[obj_counter++] = v;

Custom objects (e.g. int64) were not put into the shared lookup table, and the
object count was not correctly maintained. This causes problems when
deserializing shared custom objects.

Simplest example to exhibit bug: write a tuple (i,i), where i is an int64 to a
file with output_value. On input_value, the second component is a garbage
pointer.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000477)
administrator (administrator)
2000-11-30 18:13

Dear Manuel,

> I found two errors in the serialization code, one related to int64's in
> particular, the other for all custom objects.

Well spotted. I've fixed both bugs as you suggested, and added the
corresponding test cases.

Thanks for the bug report.

All the best,

- Xavier

(0000478)
administrator (administrator)
2000-11-30 18:14

Fixed 2000-11-30 by Xavier

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker