[PATCH] D150264: [libcxx] Add strict weak ordering checks to sorting algorithms

Danila Kutenin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 10 05:59:23 PDT 2023


danlark created this revision.
danlark added reviewers: ldionne, philnik.
Herald added subscribers: mgrang, arichardson.
Herald added a project: All.
danlark requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, libcxx-commits, jplehr, sstefan1.
Herald added projects: libc++, LLVM.
Herald added a reviewer: libc++.

This is the implementation of the first proposal of strict weak ordering checks described in https://discourse.llvm.org/t/rfc-strict-weak-ordering-checks-in-the-debug-libc/70217

This targets the most vulnerable algorithms like std::sort


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150264

Files:
  libcxx/include/CMakeLists.txt
  libcxx/include/__algorithm/sort.h
  libcxx/include/__algorithm/sort_heap.h
  libcxx/include/__algorithm/stable_sort.h
  libcxx/include/__debug
  libcxx/include/__debug_utils/strict_weak_ordering_check.h
  libcxx/include/module.modulemap.in
  libcxx/test/libcxx/algorithms/alg.sorting/assert.sort.invalid_comparator.pass.cpp
  libcxx/test/libcxx/private_headers.verify.cpp
  libcxx/utils/data/ignore_format.txt
  llvm/utils/gn/secondary/libcxx/include/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150264.520961.patch
Type: text/x-patch
Size: 19501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230510/65019359/attachment.bin>


More information about the llvm-commits mailing list