[PATCH] D96349: [instcombine] Exploit UB implied by nofree attributes

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 11:07:44 PST 2021


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

LGTM. We should probably add the following negative test case:

  ; Freeing in a nonfree function is fine if the effect is invisible to the outside
  define void @test16() nofree {
    i8* %foo = call i8* @malloc(i32 1)
    call void @free(i8* %foo)
    ret void
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96349/new/

https://reviews.llvm.org/D96349



More information about the llvm-commits mailing list