Issue 235726
Summary llubi accepts an indirect call to a function excluded by callees metadata
Labels new issue
Assignees
Reporter Roticv912
    An indirect call executes a function absent from its !callees set and returns normally without reporting undefined behavior.

### Program
```llvm
@fp = global ptr @g
define void @f() { ret void }
define void @g() { ret void }
!0 = !{ptr @f}

define i32 @main() {
entry:
  %p = load ptr, ptr @fp
  call void %p(), !callees !0
 ret i32 0
}
```

### Output
```
Entering function: main
  %p = load ptr, ptr @fp, align 8 => ptr 0x8 [@g]
Entering function: g
  ret void
Exiting function: g
  call void %p(), !callees !0
  ret i32 0
Exiting function: main
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to