A bugfix and a test for COFF import directory iterator

Rui Ueyama ruiu at google.com
Thu Oct 16 08:14:07 PDT 2014


Can you elaborate why you think the original expression to calculate size
(DataEntry->Size / - sizeof(import_directory_table_entry) - 1) is wrong?

On Wed, Oct 15, 2014 at 10:16 PM, Pyry Kontio <pyry.kontio at drasa.eu> wrote:

> Hi,
>
> The reading the import directory (.idata section in COFF file format) with
> COFF parser is broken. Basically, it calculates the section size wrong, and
> doesn't even move the iterator when trying to iterate.
>
> I fixed the problems without touching the API and tried to keep the
> changes in minimum.
>
> I also wrote a unit test that checks whether parsing the imports and
> export works.
>
> However, I haven't got any knowledge how the test suite in LLVM works, so
> the test needs to be modified and adapted to that.
>
> The patch is attached.
>
> Best regards,
> Pyry Kontio
>
> _______________________________________________
> 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/20141016/0dc4aa66/attachment.html>


More information about the llvm-commits mailing list