PATCH: Fix MemoryBufferMMapFile error reporting

Yaron Keren yaron.keren at gmail.com
Fri Dec 12 13:01:30 PST 2014


I'm not sure how to test this either, but the bug is obvious and your patch
LGTM.


2014-12-12 22:36 GMT+02:00 Kim Gräsman <kim.grasman at gmail.com>:

> Hello,
>
> I stumbled over a bug in MemoryBufferMMapFile, where it fails to
> report errors from its constructor.
>
> Attached patch changes the EC argument of its constructor to be passed
> by-ref, which matches what its client (getOpenFileImpl) expects.
>
> I've experimented with test cases to reproduce this, but I haven't
> found any clear-cut ways to do it (it's hidden behind too many
> incidental details). I've attached my last attempt, but it closes the
> global stdin fd as a side-effect, so it's no good.
>
> For what it's worth,
> - Kim
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141212/00e5f8cb/attachment.html>


More information about the llvm-commits mailing list