[llvm] [FIX] Fix undefined-behaviour in regex engine. (PR #73071)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 21:09:21 PST 2023


dwblaikie wrote:

Hmm, I was going to merge this but I started thinking about how to tidy up the commit message and then went down a rabbit hole of: Wait, why do we need this?

Could you help me understand a bit more what code is invalid here, down in the regex implementation? Because we do pass down the length (which should be zero) - so the underlying code should never dereference the pointer, right? So how do we end up with UB?

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


More information about the llvm-commits mailing list