Open Cydox opened 1 month ago
I do have a fix for this I'll submit shortly.
@llvm/issue-subscribers-clang-codegen
Author: Jan Hendrik Farr (Cydox)
cc @nathanchance @kees @bwendling
Fix is at: https://github.com/Cydox/llvm-project/tree/fix-bdos-offby4 Just adding an additional test based on the reproducer now (and waiting for a full recompile as I just rebased on top of main)
Under certain circumstances __bdos can be off by 4 bytes compared to gcc.
Seen in the linux kernel: https://lore.kernel.org/linux-kernel/3D0816D1-0807-4D37-8D5F-3C55CA910FAA@linux.dev/
Reproducer from Thorsten Blum (also here: https://godbolt.org/z/vvK9PE1Yq):