<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 23, 2013 at 12:50 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">What do you think of the attached patch? Splitting the interface so<br>


that there is always only one size is probably better than asserting<br>
that the correct size is passed.<br></blockquote><div><br></div><div>LGTM! I like the idea of splitting the API.</div><div><br></div><div><div>+  static error_code getOpenFileSlice(int FD, const char *Filename,</div><div>

+                                OwningPtr<MemoryBuffer> &Result,</div><div>+                                uint64_t MapSize,</div><div>+                                int64_t Offset);</div><div>+</div></div>
<div>
<br></div><div>Style nit: Is the formatting OK here? Aligning all arguments to the same column is probably nicer. Same applies to other places in the patch.</div><div><br></div><div>Eli</div><div><br></div><div><br></div>

<div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5"><br>
On 23 July 2013 14:03, Eli Bendersky <<a href="mailto:eliben@google.com">eliben@google.com</a>> wrote:<br>
><br>
><br>
><br>
> On Tue, Jul 23, 2013 at 10:57 AM, Rafael Espíndola<br>
> <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
>><br>
>> > Sure. But one question remains - is gold-plugin using the API of<br>
>> > getOpenFile<br>
>> > incorrectly by passing a positive Offset, and at the same time passing<br>
>> > the<br>
>> > buffer size into FileSize rather than MapSize?<br>
>><br>
>> I am almost sure it is. I will try to change it too. Thanks for finding<br>
>> this!<br>
>><br>
><br>
> Cool. I'll wait until after your change(s) to push the updated test.<br>
><br>
> Eli<br>
><br>
><br>
</div></div></blockquote></div><br></div></div>