[llvm] r289184 - Support: Use a 64-bit seek in raw_fd_ostream::seek().

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 10:48:34 PST 2016


I am not sure.
Adding lseek64 to the white-list should be fine as well.

Problem is that some libc stuff is intercepted by sanitizers. Linking could
work but intercepted function will crash when it's called from symblizer
and it would need custom implementation. So white-list allows us to
explicitly make decision on every new dependency.

Still linking only test could be a good idea. I can imagine that in real
life new functions will not be carefully investigated and will be just
added to the white list. And only then when we start crashing in symbolizer
we will consider custom implementation.


On Mon, Dec 12, 2016 at 10:10 AM Peter Collingbourne <peter at pcc.me.uk>
wrote:

> Should be fixed by r289449.
>
> By the way, it seems really weird that changes to lib/Support should
> require changes to some other random part of the project. Should this
> script be checking for the desired property more directly, e.g. by linking
> a test program and testing that the link succeeds?
>
> Peter
>
> On Mon, Dec 12, 2016 at 8:31 AM, Mike Aizatsky <aizatsky at google.com>
> wrote:
>
> Peter,
>
> I think this breaks many bots:
>
> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/368
>
> On Thu, Dec 8, 2016 at 9:07 PM Peter Collingbourne via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
> Author: pcc
> Date: Thu Dec  8 22:57:19 2016
> New Revision: 289184
>
> URL: http://llvm.org/viewvc/llvm-project?rev=289184&view=rev
> Log:
> Support: Use a 64-bit seek in raw_fd_ostream::seek().
>
> Modified:
>     llvm/trunk/lib/Support/raw_ostream.cpp
>
> Modified: llvm/trunk/lib/Support/raw_ostream.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=289184&r1=289183&r2=289184&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Support/raw_ostream.cpp (original)
> +++ llvm/trunk/lib/Support/raw_ostream.cpp Thu Dec  8 22:57:19 2016
> @@ -598,7 +598,11 @@ void raw_fd_ostream::close() {
>  uint64_t raw_fd_ostream::seek(uint64_t off) {
>    assert(SupportsSeeking && "Stream does not support seeking!");
>    flush();
> -  pos = ::lseek(FD, off, SEEK_SET);
> +#ifdef LLVM_ON_WIN32
> +  pos = ::_lseeki64(FD, off, SEEK_SET);
> +#else
> +  pos = ::lseek64(FD, off, SEEK_SET);
> +#endif
>    if (pos == (uint64_t)-1)
>      error_detected();
>    return pos;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
> --
> Mike
> Sent from phone
>
>
>
>
> --
> --
> Peter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161212/71760d8e/attachment.html>


More information about the llvm-commits mailing list