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've changed marshalling code to use variable-length encoding for all integer numbers. This change lifts the restriction on the size of type that can be stored in PDOM.

-sergey


On Wed, Dec 19, 2012 at 12:54 AM, Nathan Ridge <zeratul976@xxxxxxxxxxx> wrote:

> 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

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top