Closed euloh closed 1 year ago
Kris writes:
This is indeed a bug. In the original code, the record size stores the size
of the aggregation data. That is in a sense OK but it is inconsistent with
the fact that all other records store as size the size of the actual data item
in the buffer. In this case that would be the ID of an aggregation, and thus
it would be a 64-bit value. The data size of an aggregation is found in the
dtrace_aggdesc_t structure and that is where we should retrieve it from.
But there is another problem... We are incorrectly (for now) applying the
record offset to the aggdata address, and that mens we're not reading the
correct data. We should just use aggdata as the address.
Verified as fixed.
The test tst.multiaggs3.d fails. (It still has an @@xfail annotation, but that should be lifted.) The problem can be illustrated simply with:
The problem is formatted printa().