[all-commits] [llvm/llvm-project] 6c404f: [InstCombine][asan] Don't speculate loads before `...

Vitaly Buka via All-commits all-commits at lists.llvm.org
Fri Jul 26 17:55:01 PDT 2024


  Branch: refs/heads/users/vitalybuka/spr/instcombineasan-dont-speculate-loads-before-select-ptr
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c404f78e56a3376aebd3be261086ba42c71f571
      https://github.com/llvm/llvm-project/commit/6c404f78e56a3376aebd3be261086ba42c71f571
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-07-26 (Fri, 26 Jul 2024)

  Changed paths:
    M llvm/lib/Analysis/Loads.cpp
    M llvm/test/Transforms/InstCombine/load.ll
    M llvm/test/Transforms/InstCombine/ptr-replace-alloca.ll
    A llvm/test/Transforms/InstCombine/select-load.ll
    M llvm/test/Transforms/InstCombine/strnlen-2.ll
    M llvm/test/Transforms/SROA/phi-and-select.ll
    M llvm/test/Transforms/SROA/phi-with-duplicate-pred.ll
    M llvm/test/Transforms/SROA/select-load.ll

  Log Message:
  -----------
  [InstCombine][asan] Don't speculate loads before `select ptr`

Even if memory is valid from `llvm` point of view,
e.g. local alloca, sanitizers have API for user
specific memory annotations.

This annotations can be used to track size of the
local object, e.g. inline vector like may prevent
accessed beyond the current vector size.

So valid programs should not access those parts of
alloca before checking preconditions.

Fixes #100639.

Pull Request: https://github.com/llvm/llvm-project/pull/100773



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list