This is an archive of the discontinued LLVM Phabricator instance.

[trace] Use vector instead of ArrayRef when reading data
ClosedPublic

Authored by wallace on Mar 21 2022, 3:49 PM.

Details

Summary

I incorrectly returned an ArrayRef when the underlying object didn't own
the data. Instead, returning a vector<uint8_t> is what we should do.

This fixes an issue when trying to access an intel-pt trace buffer
larger than 16 MB.

repro

go to a breakpoint
thread trace start -s 16777216
n
thread trace dump instructions # this doesn't fail anymore

Diff Detail

Event Timeline

wallace created this revision.Mar 21 2022, 3:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2022, 3:49 PM
wallace requested review of this revision.Mar 21 2022, 3:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2022, 3:49 PM
jj10306 accepted this revision.Mar 21 2022, 4:00 PM
This revision is now accepted and ready to land.Mar 21 2022, 4:00 PM