[all-commits] [llvm/llvm-project] 48ad42: [BOLT] Fix use-after-free in RewriteInstance::mapC...

Job Noorman via All-commits all-commits at lists.llvm.org
Mon Apr 17 07:17:20 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 48ad4296f7847db15b6bee7a465fc2cbe687ba6a
      https://github.com/llvm/llvm-project/commit/48ad4296f7847db15b6bee7a465fc2cbe687ba6a
  Author: Job Noorman <jnoorman at igalia.com>
  Date:   2023-04-17 (Mon, 17 Apr 2023)

  Changed paths:
    M bolt/lib/Rewrite/RewriteInstance.cpp

  Log Message:
  -----------
  [BOLT] Fix use-after-free in RewriteInstance::mapCodeSections

When a cold function is too large, its section gets deregistered.
However, the section is still dereferenced later to get its RuntimeDyld
ID. This patch moves the deregistration to after the last dereference.

Reviewed By: Amir

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




More information about the All-commits mailing list