<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62048>62048</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
libunwind parseFDEInstructions segfaults due to a zero cieInfo
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
xxchan
</td>
</tr>
</table>
<pre>
I've posted the issue on discourse before. Not sure which place is better. More context there https://discourse.llvm.org/t/libunwind-parsefdeinstructions-segfaults-at-null-pointer/69858/
I have few knowledge about compiler and not sure whether it's libunwind or the compiler(rustc)'s fault. Any suggestion about how to diagnose such issues would be appreciated. :pray:
---
(in `parseFDEInstructions`)
```
(ParseInfo[2]) parseInfoArray = {
[0] = (instructions = 0, instructionsEnd = 4467765419, pcoffset = 18446744073709551615)
[1] = (instructions = 4468701376, instructionsEnd = 7423526062, pcoffset = 4206506293)
}
```
This `instructions = 0` leads to the segfault
It is `cieInfo.cieInstructions`
```
cieInfo = 0x0000000170407750: {
cieStart = 4467765419
cieLength = 0
cieInstructions = 0
pointerEncoding = '\0'
lsdaEncoding = '\xff'
personalityEncoding = '\0'
personalityOffsetInCIE = '\0'
personality = 0
codeAlignFactor = 0
dataAlignFactor = 0
isSignalFrame = false
fdesHaveAugmentationData = false
returnAddressRegister = '\0'
addressesSignedWithBKey = false
mteTaggedFrame = false
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVVuP4jgT_TXmpQRynPtDHuih0Ye-vWlnpH127EriXWNHttM0--tXTqCBbWYHoViqOlV16pQv3HvVG8SG5C8k3634FAbrmvd3MXCzaq08NwfCyjeE0fqAEsKAoLyfEKwBqbywk_MILXbW4QZ-sQH85BBOgxIDjJqLiIcWQ0C3gZ-tQxDWBHwPMZdDGEIYPUm3hO0J23-k3Gj9dtxY1xO2D4TttWonc1JGrkfuPHYSlfHBTSIoa_zaY9_xSQe_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