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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected],
                    [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to