[PATCH] D54739: [Sanitizer] intercept setvbuf on other platforms where it is supported
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 20 14:16:57 PST 2018
vitalybuka added inline comments.
================
Comment at: test/sanitizer_common/TestCases/Posix/setvbuf.cc:19
setbuf(stdout, buf);
----------------
krytarowski wrote:
> 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.
Sorry, I am not asking to remove them.
Just pointing out that we probably need more interceptors on other platforms.
https://reviews.llvm.org/D54739
More information about the llvm-commits
mailing list