[all-commits] [llvm/llvm-project] 322e15: [MSan] Fix calling pointers to varargs functions o...

Ilya Leoshkevich via All-commits all-commits at lists.llvm.org
Mon Feb 6 14:35:30 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 322e150e3392026a205c583da80e8971653825c8
      https://github.com/llvm/llvm-project/commit/322e150e3392026a205c583da80e8971653825c8
  Author: Ilya Leoshkevich <iii at linux.ibm.com>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
    M llvm/test/Instrumentation/MemorySanitizer/SystemZ/vararg-kernel.ll
    M llvm/test/Instrumentation/MemorySanitizer/SystemZ/vararg.ll

  Log Message:
  -----------
  [MSan] Fix calling pointers to varargs functions on SystemZ

VarArgSystemZHelper.visitCallBase() checks whether the callee has the
"use-soft-float" attribute, but if the callee is a function pointer, a
null pointer dereference happens.

Fix by checking this attribute on the current function. Alternatively,
one could try the callee first, but this is pointless, since one should
not be mixing hardfloat and softfloat code anyway.

Reviewed By: uweigand

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




More information about the All-commits mailing list