[all-commits] [llvm/llvm-project] 099fd3: Fix undefined behavior due to deleting an object w...

Richard Smith via All-commits all-commits at lists.llvm.org
Tue Jul 14 17:30:35 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 099fd3748470435d478dc480c00ac1f848b7c55d
      https://github.com/llvm/llvm-project/commit/099fd3748470435d478dc480c00ac1f848b7c55d
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-07-14 (Tue, 14 Jul 2020)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
    M llvm/include/llvm/ExecutionEngine/Orc/LazyReexports.h
    M llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp

  Log Message:
  -----------
  Fix undefined behavior due to deleting an object with a non-virtual
destructor via a pointer of the wrong static type.

This caused crashes during deallocation in C++14 builds when using a
deallocator whose sized delete requires the size argument to be correct.

Also make the LazyCallThroughManager destructor protected to catch this
sort of bug in the future.




More information about the All-commits mailing list