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

There are couple places in marshalling and unmarshalling code that cause concerns:

  1. The value of the first byte used for UNSTORABLE_TYPE (0xFD) doesn't collide with UNKNOWN_MEMBER_CLASS_INSTANCE (0x0D) | FLAG1 (0x10) | FLAG2 (0x20) | FLAG3 (0x40) | FLAG4 (0x80) only because marshalling of CPPUnknownClassInstance does not use flags. INDIRECT_TYPE (0xFF) and BINDING_TYPE (0xFE) also nearly avoid collision with ALIAS_TEMPLATE (0x0F) and DEFERRED_CLASS_INSTANCE (0x0E). This looks very fragile.
  2. There is a seemingly unnecessary zero byte in marshalling of IBinding ( line 88). This zero byte is skipped unconditionally during unmarshalling (line 101). Nevertheless an attempt to remove the line 88 and to change the line 101 to fPos++ instead of fPos += 2 leads to numerous unmarshalling errors. Does anybody know why a zero byte after BINDING_TYPE is necessary?

On Wed, Dec 12, 2012 at 5:24 PM, 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

I am wondering, does anyone have suggestions/tips for debugging
such an issue? I'm not really sure how to go about it.



cdt-dev mailing list

Back to the top