[all-commits] [llvm/llvm-project] 7a9ebe: [msan] Intercept qsort, qsort_r.

Evgenii Stepanov via All-commits all-commits at lists.llvm.org
Mon Dec 23 11:35:02 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7a9ebe95125ea87a494d0c18f44f10bd70e12188
      https://github.com/llvm/llvm-project/commit/7a9ebe95125ea87a494d0c18f44f10bd70e12188
  Author: Evgenii Stepanov <eugenis at google.com>
  Date:   2019-12-23 (Mon, 23 Dec 2019)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
    M compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
    A compiler-rt/test/msan/qsort.cpp

  Log Message:
  -----------
  [msan] Intercept qsort, qsort_r.

Summary:
This fixes qsort-related false positives with glibc-2.27.
I'm not entirely sure why they did not show up with the earlier
versions; the code seems similar enough.

Reviewers: vitalybuka

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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


  Commit: caa48a6b88aeed8ae80e6ddb1eae8c6a7cbe260b
      https://github.com/llvm/llvm-project/commit/caa48a6b88aeed8ae80e6ddb1eae8c6a7cbe260b
  Author: Evgenii Stepanov <eugenis at google.com>
  Date:   2019-12-23 (Mon, 23 Dec 2019)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
    M compiler-rt/test/msan/qsort.cpp

  Log Message:
  -----------
  [msan] Check qsort input.

Summary:
Qsort interceptor suppresses all checks by unpoisoning the data in the
wrapper of a comparator function, and then unpoisoning the output array
as well.

This change adds an explicit run of the comparator on all elements of
the input array to catch any sanitizer bugs.

Reviewers: vitalybuka

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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


Compare: https://github.com/llvm/llvm-project/compare/d35bcbbb5dab...caa48a6b88ae


More information about the All-commits mailing list