[llvm] [DWARF] Emit a worst-case prologue_end flag for pathological inputs (PR #107849)

Haojian Wu via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 13 02:04:52 PST 2024


hokein wrote:

This patch introduces an undefined behavior in clang:

```
$ cat /t/t.ii
int a() {}
$ ./bin/clang -O2 -g -c /t/t.ii 
/t/t.ii:1:10: warning: non-void function does not return a value [-Wreturn-type]
    1 | int a() {}
      |          ^
/workspace/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:169:12: runtime error: reference binding to null pointer of type 'const llvm::MachineInstr'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior/workspace/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:169:12 in 
```

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


More information about the llvm-commits mailing list