Skip to content

libunwind parseFDEInstructions segfaults due to a zero cieInfo #62048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xxchan opened this issue Apr 10, 2023 · 1 comment
Open

libunwind parseFDEInstructions segfaults due to a zero cieInfo #62048

xxchan opened this issue Apr 10, 2023 · 1 comment

Comments

@xxchan
Copy link

xxchan commented Apr 10, 2023

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. 🙏


(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
}
@xxchan
Copy link
Author

xxchan commented Apr 10, 2023

Original context: rust-lang/rust#104388

To reproduce: (need Rust toolchain and LLVM installed by Homebrew, M1 Mac)

git clone https://github.com/risingwavelabs/risingwave && cd risingwave
git checkout 7e0c548
./risedev p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants