diff options
author | Jeffrey Tan <jeffreytan@fb.com> | 2023-07-26 12:28:57 -0700 |
---|---|---|
committer | Jeffrey Tan <jeffreytan@fb.com> | 2023-07-26 16:12:41 -0700 |
commit | ca849352936dadadd232cf9ec74ac006ce410f51 (patch) | |
tree | f805df4acd3263427451e05d5a52915c4dd3dc0c /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 474cf4feb71cee8d8be96b1376febee685478d1a (diff) | |
download | llvm-ca849352936dadadd232cf9ec74ac006ce410f51.zip llvm-ca849352936dadadd232cf9ec74ac006ce410f51.tar.gz llvm-ca849352936dadadd232cf9ec74ac006ce410f51.tar.bz2 |
Fix lldb-vscode frame id integer overflow
This patch fixes a 32bit integer overflow in lldb-vscode.
The current implementation of frame_id does `(thread_index << 19 | frame_index)`. Since thread_index is a 32 bit integer this leaves only 32 - 19 == 13 bits available for the thread_index. As a result, lldb-vscode can only handle 2^13 == 8192 threads. Normally, this would be sufficient, but we have seen crazy process having +12000 threads, causing the frame_id algorithm above to integer overflow during casting.
The patch fixes the overflow by up casting to 64 bit integer first before bit shifiting.
Differential Revision: https://reviews.llvm.org/D156375
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions