PATCH: Fix MemoryBufferMMapFile error reporting

Kim Gräsman kim.grasman at gmail.com
Fri Dec 12 13:33:16 PST 2014


It'd be great if someone could commit this for me, I don't have commit access.

Thanks,
- Kim

On Fri, Dec 12, 2014 at 10:01 PM, Yaron Keren <yaron.keren at gmail.com> wrote:
> 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
>>
>




More information about the llvm-commits mailing list