[llvm] [LLVM] AsmLexer invalid read fix. (PR #154972)

Szymon Piotr Milczek via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 22 10:44:26 PDT 2025


smilczek wrote:

> Need a llvm/test/MC/AsmParser test to confirm we actually have the out-of-bounds error and fix it.

Hey, thanks for the quick response!

I would love to write a test, however I haven't found a functionality that would allow me to write to memory at `CurBuf.end()`.
In order to properly test for the invalid read it seems like it would require some additional code, which misses the point, since the check I'm adding should've been there in the first place.

Do you know how if there's some already existing functionality I could use which would help?

https://github.com/llvm/llvm-project/pull/154972


More information about the llvm-commits mailing list