[PATCH] D54739: [Sanitizer] intercept setvbuf on other platforms where it is supported
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 20 14:15:25 PST 2018
krytarowski added inline comments.
================
Comment at: test/sanitizer_common/TestCases/Posix/setvbuf.cc:19
setbuf(stdout, buf);
----------------
vitalybuka wrote:
> krytarowski wrote:
> > devnexen wrote:
> > > vitalybuka wrote:
> > > > hm, we do not intercept this one, and two below
> > > Seemed a near future plan though but I can always delete them if really wished ?
> > Do not delate! setvbuf() is an internal implementation for setbuffer(3), setlinebuf(3) and setbuf(3).
> >
> > https://nxr.netbsd.org/xref/src/lib/libc/stdio/setbuffer.c
> > https://nxr.netbsd.org/xref/src/lib/libc/stdio/setbuf.c
> >
> > If you do not support them on some OS, please ifdef them out.
> I tried to read first byte from the buf on linux and it fails on uninitialized read everywhere but setvbuf
>
I've included these tests on purpose, expecting that all the variations will be handled properly with a single interceptor.
https://reviews.llvm.org/D54739
More information about the llvm-commits
mailing list