[all-commits] [llvm/llvm-project] e06fc2: Fix: Distinguish CFI Metadata Checks in MergeFunct...

Oskar Wirga via All-commits all-commits at lists.llvm.org
Sat Sep 23 03:28:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e06fc2b2e0651b60e8d21b46f9708bc74d8e4f16
      https://github.com/llvm/llvm-project/commit/e06fc2b2e0651b60e8d21b46f9708bc74d8e4f16
  Author: Oskar Wirga <10386631+oskarwirga at users.noreply.github.com>
  Date:   2023-09-23 (Sat, 23 Sep 2023)

  Changed paths:
    M llvm/lib/Transforms/IPO/MergeFunctions.cpp
    A llvm/test/Transforms/MergeFunc/cfi-function-merging.ll
    A llvm/test/Transforms/MergeFunc/merge-fp-intrinsics.ll

  Log Message:
  -----------
  Fix: Distinguish CFI Metadata Checks in MergeFunctions Pass (#65963)

This diff fixes an issue in the MergeFunctions pass where two different
Control Flow Integrity (CFI) metadata checks were incorrectly considered
identical. These merges would lead to runtime violations down the line
as two separate objects contained a single destructor which itself
contained checks for only one of the objects.

Here I update the comparison logic to take into account the metadata at
llvm.type.test checks. Now, only truly identical checks will be
considered for merging, thus preserving the integrity of each check.

Previous discussion: https://reviews.llvm.org/D154119




More information about the All-commits mailing list