Page MenuHomeFreeBSD

libc/qsort: Don't allow interposing recursive calls
Needs ReviewPublic

Authored by arichardson on Wed, Jan 13, 12:21 PM.

Details

Reviewers
emaste
dim
jrtc27
Summary

This causes problems when using ASAN with a runtime older than 12.0 since
the intercept does not expect qsort() to call itself using an interposable
function call. This results in infinite recursion and stack exhaustion
when a binary compiled with -fsanitize=address calls qsort.

See also https://bugs.llvm.org/show_bug.cgi?id=46832 and
https://reviews.llvm.org/D84509 (ASAN runtime patch)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 36166
Build 33055: arc lint + arc unit