Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix SIGABRT due to invalid heap access
When the set update completed with "inconsistent" state, the heap is in an invalid state and should not be accessed. In particular, consider the case of `SAMP -> AGG_L1 -> ldms_ls`. SAMP has a sampler that uses `LDMS_V_LIST`. AGG_L1 has finished looking up the set from SAMP, and is in the middle of updating it. At this point, the metadata on AGG_L1 has been populated, but the data+heap parts are still uninitialized. In the mean time, `ldms_ls` lookup + update the set and get SIGABRT from `ldms_heap_get()` due to bad heap signature because of the uninitialized data+heap part on the AGG_L1 that `ldms_ls` copied the data from. This patch: - adds set consistency check before getting the heap in the LDMS set update path. - adds heap pointer check in the `ldms_list_first()` list/heap access.
- Loading branch information