[all-commits] [llvm/llvm-project] 438a81: [Function Specialisation] Fix use after free

Alexandros Lamprineas via All-commits all-commits at lists.llvm.org
Wed Feb 2 08:32:58 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 438a81a2847f615c8c6236b59096393c9d285e00
      https://github.com/llvm/llvm-project/commit/438a81a2847f615c8c6236b59096393c9d285e00
  Author: Alexandros Lamprineas <alexandros.lamprineas at arm.com>
  Date:   2022-02-02 (Wed, 02 Feb 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
    A llvm/test/Transforms/FunctionSpecialization/bug52821-use-after-free.ll

  Log Message:
  -----------
  [Function Specialisation] Fix use after free

This is a fix for a use-after-free found by the address sanitizer when
compiling GCC: https://github.com/llvm/llvm-project/issues/52821

The Function Specialization pass may remove instructions, cached
inside the PredicateBase class, which are later being dereferenced
from the SCCPInstVisitor class. To prevent the dangling references
I am lazily deleting the dead instructions after the Solver has run.

Differential Revision: https://reviews.llvm.org/D118591




More information about the All-commits mailing list