[all-commits] [llvm/llvm-project] 4ac007: [RelLookupTableConverter] Bail on invalid pointer ...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Aug 9 00:37:38 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4ac00789e1b30145ec3cacc4b2a66cb755ff9e4a
      https://github.com/llvm/llvm-project/commit/4ac00789e1b30145ec3cacc4b2a66cb755ff9e4a
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-08-09 (Tue, 09 Aug 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp
    A llvm/test/Transforms/RelLookupTableConverter/X86/gnux32.ll

  Log Message:
  -----------
  [RelLookupTableConverter] Bail on invalid pointer size (x32)

The RelLookupTableConverter pass currently only supports 64-bit
pointers.  This is currently enforced using an isArch64Bit() check
on the target triple. However, we consider x32 to be a 64-bit target,
even though the pointers are 32-bit. (And independently of that
specific example, there may be address spaces with different pointer
sizes.)

As such, add an additional guard for the size of the pointers that
are actually part of the lookup table.

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




More information about the All-commits mailing list