[all-commits] [llvm/llvm-project] 5748a7: [builtins] Fix integer/pointer confusion in gcc_pe...

Jessica Clarke via All-commits all-commits at lists.llvm.org
Wed Jan 27 11:38:48 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5748a71ba3da69e9f0bfb2024eadfe6eeacade01
      https://github.com/llvm/llvm-project/commit/5748a71ba3da69e9f0bfb2024eadfe6eeacade01
  Author: Jessica Clarke <jrtc27 at jrtc27.com>
  Date:   2021-01-27 (Wed, 27 Jan 2021)

  Changed paths:
    M compiler-rt/lib/builtins/gcc_personality_v0.c

  Log Message:
  -----------
  [builtins] Fix integer/pointer confusion in gcc_personality_v0.c

This fixes the implementation for architectures like CHERI with strong
pointer provenance (pointers, and thus uintptr_t, are represented as
hardware capabilities). Specifically, adding two uintptr_t's together
(as is done for `start + length` and `funcStart + landingPad`) has
ambiguous provenance, whereas using a plain integer (such as size_t) for
the offset operand does not. Also, readULEB128 is creating a plain
integer, not a pointer.

On all currently-supported architectures this should be an NFC, as
size_t and uintptr_t end up being the same underlying plain integer
type.

Reviewed By: MaskRay

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




More information about the All-commits mailing list