Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002697 [Quercus] major always 05-26-08 13:13 09-05-08 22:38
Reporter perololo View Status public  
Assigned To nam
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.2.1 Product Version 3.2.0
  Product Build
Summary 0002697: [PATCH] unserialize does not work properly with lot of dereferencing
Description unserialize failed to operate properly with lot of references and the following scenario after some already dereferenced references:

Parent.children = array(Child.parent --> reference-to-parent )

Error:
------
Index out of bounds:

SEVERE: java.io.IOException: reference id '438' not found in list (max id: 428, parse index: 12209)
java.io.IOException: reference id '438' not found in list (max id: 428, parse index: 12209)
        at com.caucho.quercus.lib.UnserializeReader.unserialize(UnserializeReader.java:319)
        at com.caucho.quercus.lib.UnserializeReader.unserialize(UnserializeReader.java:280)
        at com.caucho.quercus.lib.UnserializeReader.unserialize(UnserializeReader.java:232)
        at com.caucho.quercus.lib.UnserializeReader.unserialize(UnserializeReader.java:280)
        at com.caucho.quercus.lib.UnserializeReader.unserialize(UnserializeReader.java:232)
        at com.caucho.quercus.lib.UnserializeReader.unserialize(UnserializeReader.java:280)
        at com.caucho.quercus.lib.UnserializeReader.unserialize(UnserializeReader.java:280)
        at com.caucho.quercus.lib.VariableModule.unserialize(VariableModule.java:675)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


Reason:
-------
When dereferencing takes place, the new read reference does not add any value to the reference list (_valueList). But this list must contain exactly as many data elements as there are in the serialized string. Therefore after some deferencing _valueList contains less values than expected. An index-out-of-bounds exception may take place.

Solution:
---------
All read references must add a dummy value to _valueList.

--> see attached patch
Steps To Reproduce
Additional Information
Attached Files  g:\Kundenumsetzungen\Online\quercus-3.2-svn_unserialize.2008-05-26.22-00.diff [^] (3,269 bytes) 05-26-08 13:13

- Relationships

- Notes
(0003404)
nam
09-05-08 22:38

Issue was due to Quercus not correctly serializing object assignments.

See:
http://bugs.caucho.com/view.php?id=2895 [^]
http://bugs.caucho.com/view.php?id=2910 [^]
 

- Issue History
Date Modified Username Field Change
05-26-08 13:13 perololo New Issue
05-26-08 13:13 perololo File Added: g:\Kundenumsetzungen\Online\quercus-3.2-svn_unserialize.2008-05-26.22-00.diff
05-29-08 12:36 nam Status new => assigned
05-29-08 12:36 nam Assigned To  => nam
09-05-08 22:38 nam Status assigned => closed
09-05-08 22:38 nam Note Added: 0003404
09-05-08 22:38 nam Resolution open => fixed
09-05-08 22:38 nam Fixed in Version  => 3.2.1


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker