Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a crash from character type confusion interaction with libedit (l…
…lvm#75388) If you type `settings show <tab>` LLDB might crash, depending on the version of libedit you're compiled with, and whether you're compiled with `-DLLDB_EDITLINE_USE_WCHAR=0` (and depending on how the optimizer lays out the stack...) The issue has to do with trying to figure out whether the libedit `getchar` callback is supposed to read a wide or 8 bit character. In order to maintain backward compatibility, there's really no 'clean' way to do it. We just have to make sure that we're invoking el_[w]getc with a buffer that is as wide as the getchar callback (registered by the `SetGetCharacterFunction` function further down in `Editline.cpp`. So, it's 'fixed' with a comment, and a wider version of the 'reply' variable. Co-authored-by: Kevin Frei <freik@meta.com>
- Loading branch information