Thrift isset was failing with a SEGV if the struct contained padding. This is
because we indexed the isset_indexes data structure using our field index
rather than the index of the field in Thrift. This then gave a rubbish index
for any exceeding which happens if we have added padding in the middle of the
struct, and this index was looked up in the bitset which can cause a SEGV.
Track a new index thriftFieldIdx which is only incremented if we've looked up
a Thrift index.
Namespaced the generated Thrift structs while I was there. This isn't necessary
anymore but cleans things up.
Test plan:
Added a test case with lots of padding. These don't run in the CI but it
passes locally.
FILTER='OilIntegration.*' make test - no failures
FILTER='OidIntegration.*' make test - no new failures
tbv2: fix Thrift isset lookups with padding
Thrift isset was failing with a SEGV if the struct contained padding. This is because we indexed the
isset_indexes
data structure using our field index rather than the index of the field in Thrift. This then gave a rubbish index for any exceeding which happens if we have added padding in the middle of the struct, and this index was looked up in the bitset which can cause a SEGV.Track a new index
thriftFieldIdx
which is only incremented if we've looked up a Thrift index.Namespaced the generated Thrift structs while I was there. This isn't necessary anymore but cleans things up.
Test plan:
FILTER='OilIntegration.*' make test
- no failuresFILTER='OidIntegration.*' make test
- no new failures