[all-commits] [llvm/llvm-project] 31e44c: [trace] Use vector instead of ArrayRef when readin...
walter erquinigo via All-commits
all-commits at lists.llvm.org
Mon Mar 21 16:03:53 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 31e44c01e3b5cc2cc7a9f1dc49806b3f050efb82
https://github.com/llvm/llvm-project/commit/31e44c01e3b5cc2cc7a9f1dc49806b3f050efb82
Author: Walter Erquinigo <wallace at fb.com>
Date: 2022-03-21 (Mon, 21 Mar 2022)
Changed paths:
M lldb/include/lldb/Target/Trace.h
M lldb/source/Target/Trace.cpp
Log Message:
-----------
[trace] Use vector instead of ArrayRef when reading data
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
```
Differential Revision: https://reviews.llvm.org/D122192
Commit: a80c6c7d36d25999a28cfad32e1f461db95ba4dc
https://github.com/llvm/llvm-project/commit/a80c6c7d36d25999a28cfad32e1f461db95ba4dc
Author: Walter Erquinigo <wallace at fb.com>
Date: 2022-03-21 (Mon, 21 Mar 2022)
Changed paths:
M lldb/source/Target/Target.cpp
M lldb/test/API/commands/trace/TestTraceStartStop.py
Log Message:
-----------
[trace] clear any existing tracing sessions before relaunching the binary
There's a bug caused when a process is relaunched: the target, which
doesn't change, keeps the Trace object from the previous process, which
is already defunct, and causes segmentation faults when it's attempted
to be used.
A fix is to clean up the Trace object when the target is disposing of
the previous process during relaunches.
A way to reproduce this:
```
lldb a.out
b main
r
process trace start
c
r
process trace start
```
Differential Revision: https://reviews.llvm.org/D122176
Compare: https://github.com/llvm/llvm-project/compare/f4b794427e80...a80c6c7d36d2
More information about the All-commits
mailing list