You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a whole segment is deleted in a Hypercore TAM table, a segmentation
fault can be triggered that results from reading freed data.
After calling `table_open()` and locking the table in
`LockRelationOid()` all invalidation messages will be processed. This
can invalidate the `rd_amcache` field for the relation, but also for
other relations.
As a result, this caused clobbered data to be used when finding the
count column in the compressed relation since the attribute number was
0x7f7f when first fetching HypercoreInfo using
`RelationGetHypercoreInfo()`, calling `table_open()`, and then trying
to use the data in the structure again.
This commit fixes this by not re-using data returned by
`RelationGetHypercoreInfo()` after calling `table_open()`. Since one of
the more common cases for this is opening the compressed table beloning
to a chunk, a new function were introduced for handling this case.
It also moves calls to `RelationGetHypercoreInfo()` inside functions
that need the data to avoid re-using the data after calls that can
invalidate the cache.
0 commit comments