<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64093>64093</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
instruction-referencing creates DW_OP_deref_size with invalid/too large size
</td>
</tr>
<tr>
<th>Labels</th>
<td>
wrong-debug,
debuginfo
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
jmorse
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dwblaikie
</td>
</tr>
</table>
<pre>
From a discussion/debugging here: https://reviews.llvm.org/D154907
```
void b(double);
void c();
void e(double e) {
c();
b(e);
}
```
```
$ clang-tot x.ii -g -c -o - -O3 | llvm-dwarfdump-tot - | grep DW_OP_deref_size
[0x0000000000000006, 0x0000000000000016): DW_OP_breg7 RSP+0, DW_OP_deref_size 0x10, DW_OP_stack_value)
```
This seems to be created here: https://github.com/llvm/llvm-project/blob/dd84f5f91c6b234a2f188b6acf8557cae81b8a53/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp#L1280-L1281 - where the size is 16 (0x10).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU8GOnDgQ_ZriUqJlyriBA4fpabGKFClRdrV7HNmmoJ3QuGWb7tn9-hVMKzuZyR6CEFCuolTv1Xs6RjfOzC2oAxB9PfsQGYhAHTO9pJMPbX8zk3bfHGfG93-3XfBn1Ni7aJcYnZ-Bup7NMo5uHvHEgUE-4CmlSwT5ANQBdYGvjm9xN03X886HEag7FqpsRAXiCOIB9uJ-b-HVux4NUN37xUwM1IA8vEpZoPrdIX-vXz8bhOqexXf1W-8f2kJ1_Okkb0Mq0U56HvPkEz7vnMN8xNxi7jHH_JNEqB5xRZn3Nx2GfjlfttJ8S4yBL3j86-nT56eeAw9P0f3D95FAHcSz-PHaAz3i29Nivw3-cG9kAo8Vfvn9M9BBrPVv-6N4Ll4lYtL229NVT8tGwM9Q_nFyESPzOWLyaBhtYJ24_5_lji6dFrOz_gzUrdjvr_wS_Fe2CagzkzerTPq6HNTQFHZvSJaahqKuzV7boVaqsprrwtRayVd93Prfo-_5N16F9tFd-biK7c8VQATqPswxhS88HHTk_sP5Mu3s5QIkPxZUi3x9FpjjbR0d04lxo8RFLPYIVL9w0-yyvpV9IxudcVvsG0FKlRVlp1YXQ1lVythBKNHUjVSNKIxtWFnd1JXKXEuCpKhICUmlpN1greRaEsl6aFRhoBR81m76Lv7Mxbhwuy9FI7NJG57i3X234Ocx38y0WpAegWiL3Dz4uylDu3FrljFCKSYX03-2ypJLE7dupWSxyfk5Dzxw4Nmu3nxZY3yvkJtLJ3TzVU-uB-qS9zjpML6QlS1han954xvGdT8bzH8DAAD__7hTUCc">