Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] debugging index marshalling issues

> I am trying to debug an issue that arises during the unmarshalling
> of some data (types/bindings/evaluations) from the index [1].
>
> It seems that there is some asymmetry between the marshaling and
> the unmarshaling, or some data is being corrupted (an
> EvalBinaryTypeId is being unmarshalled from the index even though
> the parser never created an EvalBinaryTypeId or wrote one to the
> index).

I figured out what the problem was: when storing the contents of a
TypeMarshalBuffer in the PDOM, the length of the buffer is stored
as a short (PDOMLinkage.java line 463). This assumes that the size
of the buffer is less than Short.MAX_VALUE (32767) bytes.

In the example I was investigating, a very complicated type needed
to be stored, and the size of the buffer exceeded that.

How should this be handled? Even if we don't add support for 
storing buffers larger than 32767 bytes right now, we should't
allow an attempt to do so to silently succeed and later cause an
unmarshalling error.

Regards,
Nate
 		 	   		  

Back to the top