[all-commits] [llvm/llvm-project] 5b0502: [pstl] A fix for move placement-new (and destroy) ...

MikeDvorskiy via All-commits all-commits at lists.llvm.org
Mon May 18 07:00:55 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b0502dff5b6f510fbf823059faa042dd1523cef
      https://github.com/llvm/llvm-project/commit/5b0502dff5b6f510fbf823059faa042dd1523cef
  Author: Dvorskiy, Mikhail <mikhail.dvorskiy at intel.com>
  Date:   2020-05-18 (Mon, 18 May 2020)

  Changed paths:
    M pstl/include/pstl/internal/algorithm_impl.h
    M pstl/include/pstl/internal/memory_impl.h
    M pstl/include/pstl/internal/parallel_backend_utils.h
    M pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp
    M pstl/test/std/algorithms/alg.modifying.operations/remove.pass.cpp
    M pstl/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp
    M pstl/test/std/algorithms/alg.modifying.operations/unique.pass.cpp
    M pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp
    M pstl/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp
    M pstl/test/support/utils.h

  Log Message:
  -----------
  [pstl] A fix for move placement-new (and destroy) allocated objects from raw memory.

https://reviews.llvm.org/D74123

The fix affects follow algorithms:
remove_if, unique, rotate, inplace_merge, partial_sort_copy, set_union, set_intersection, set_difference, set_symmetric_difference.

For "is_trivial" types there are no problems with "creating objects/clean-up"
For non-trivial types the algo results are also correct, but possible incorrect copying/moving "operator=" calls "by raw memory" within one of mentioned algo or incorrect destructor calls in the end of algo.




More information about the All-commits mailing list