[llvm-bugs] [Bug 43343] New: DW_AT_call_value location may be clobbered by callee
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 17 14:17:36 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43343
Bug ID: 43343
Summary: DW_AT_call_value location may be clobbered by callee
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: DebugInfo
Assignee: unassignedbugs at nondot.org
Reporter: vsk at apple.com
CC: jdevlieghere at apple.com, keith.walker at arm.com,
llvm-bugs at lists.llvm.org,
paul_robinson at playstation.sony.com
In https://reviews.llvm.org/D67556, David Stenberg gives an example of how the
location of a parameter in a caller can escape and be clobbered by the callee.
In this case, the debugger may print a misleading description for the parameter
when stopped in the callee.
The setup is roughly:
```
void caller() {
int local = 0;
escape(&local);
callee(local);
}
void callee(int p) {
cause_arg1_to_be_optimized_out();
*escaped_ptr_to_local = 1;
// print 'p' in the debugger: will show '1' instead of '0'.
}
```
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190917/ac3df30d/attachment.html>
More information about the llvm-bugs
mailing list