[all-commits] [llvm/llvm-project] 7f07c4: [SanitizerCoverage] Fix wrong pointer type return ...

Wu Yingcong via All-commits all-commits at lists.llvm.org
Wed Nov 9 23:29:18 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f07c4d5134e32787e89ff1d8e6f7a680a40dbd8
      https://github.com/llvm/llvm-project/commit/7f07c4d5134e32787e89ff1d8e6f7a680a40dbd8
  Author: Wu, Yingcong <yingcong.wu at intel.com>
  Date:   2022-11-09 (Wed, 09 Nov 2022)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp

  Log Message:
  -----------
  [SanitizerCoverage] Fix wrong pointer type return from CreateSecStartEnd()

`CreateSecStartEnd()` will return pointer to the input type, so when called with `CreateSecStartEnd(M, SanCovCFsSectionName, IntptrPtrTy)`, `SecStartEnd.first` and `SecStartEnd.second` will have type `IntptrPtrPtrTy`, not `IntptrPtrTy`.

This problem should not impact the functionality and with opaque pointer enable, this will not trigger any alarm. But if runs with `-no-opaque-pointers`, this mismatch pointer type will cause type check assertion in `CallInst::init()` to fail.

Reviewed By: MaskRay

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




More information about the All-commits mailing list