[all-commits] [llvm/llvm-project] 88fc5f: [InstCombine] remove uses before deleting instruct...

RotateRight via All-commits all-commits at lists.llvm.org
Thu Jan 2 06:50:03 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 88fc5fdef6f7a7af4153fa9fd9c7a142e9f4342d
      https://github.com/llvm/llvm-project/commit/88fc5fdef6f7a7af4153fa9fd9c7a142e9f4342d
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-01-02 (Thu, 02 Jan 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/builtin-object-size-ptr.ll

  Log Message:
  -----------
  [InstCombine] remove uses before deleting instructions (PR43723)

This is a less ambitious alternative to previous attempts to fix
this bug with:
rG56b2aee1875a
rGef02831f0a4e
rG56b2aee1875a
...because those all failed bot testing with use-after-free or
other problems.

The original crashing/assert problem is still showing up on
various fuzzers, so I've added a new minimal test based on
another one of those failures.

Instead of trying to manage and coordinate the logic in
isAllocSiteRemovable() with the deletion loops, just loosen
the existing code that handles casts and GEP by replacing
with undef to allow other opcodes. That means that no
instructions with uses should assert on deletion, and there
are hopefully no non-obvious sanitizer bugs induced.




More information about the All-commits mailing list