aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJustin Cady <desk@justincady.com>2023-06-07 10:59:07 -0400
committerJustin Cady <desk@justincady.com>2023-06-07 10:59:07 -0400
commita3a4369ea100d8693d45dc21eda9c2c8171b1068 (patch)
treeca3cd58d96732f44337a7e5086d0a8146ef863b1 /clang/lib/Frontend/CompilerInvocation.cpp
parent2878282dc550e6a8174917480a2dc22bbe283ed1 (diff)
downloadllvm-a3a4369ea100d8693d45dc21eda9c2c8171b1068.zip
llvm-a3a4369ea100d8693d45dc21eda9c2c8171b1068.tar.gz
llvm-a3a4369ea100d8693d45dc21eda9c2c8171b1068.tar.bz2
[ASAN] Fix validation size for dirent on FreeBSD
Typically the size required to represent a dirent is stored in `d_reclen`. But this not always the case for FreeBSD (for example, when walking a directory over NFS). This leads to ASAN false positives for `scandir` and similar functions. Because ASAN uses `d_reclen` for the range to validate, it can overrun when `d_reclen` is incorrect (too large). This change adds `__sanitizer_dirsiz` which fixes the dirent size calculation for FreeBSD. Other platforms continue to use `d_reclen`. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D151583
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions