Community
Participate
Working Groups
In PDOMPointerType and PDOMQualifierType, there are 2 fields being stored in the database: FLAGS (1 byte), and TYPE (4 bytes) ... for a total of 5 bytes. Right now, the offsets for FLAGS and TYPE are 1, and 4, respectively. It gets packed this way in the database: +---+---+---+---+---+---+---+---+ | / | F | / | / | T | T | T | T | +---+---+---+---+---+---+---+---+ 0 1 2 3 4 5 6 7 F - FLAGS T - TYPE / - unused However, the declared record size for these records is 5 bytes, so the intended packing is probably: +---+---+---+---+---+---+---+---+ | F | T | T | T | T | / | / | / | +---+---+---+---+---+---+---+---+ 0 1 2 3 4 5 6 7 So the offsets for FLAGS and TYPE should be 0 and 1, respectively. We're not seeing any side-effects right now because both fields in the current configuration fit within the 16-byte allocation unit in the PDOM.
Yikes. Luckily the minimum size for a record is 16 bytes so it still fits in the record. But this should be cleaned up so that it doesn't break in the future.
Created attachment 52933 [details] Proposed patch This should fix the offsets. This patch also contains documentation for Markus' PDOM changes which adds timestamps to PDOMFiles (bug 149571).
I ran into a similar problem in PDOMCPPVariable and fixed it together with the two offsets mentioned above.
Fixed by Markus (see comment #3)