[PATCH] D63537: [llvm-dwarfdump] --gdb-index: fix uninitialized TuListOffset

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 14:59:19 PDT 2019


Ping

On Wed, Jun 19, 2019 at 9:40 AM David Blaikie via Phabricator via
llvm-commits <llvm-commits at lists.llvm.org> wrote:

> dblaikie added inline comments.
>
>
> ================
> Comment at: llvm/trunk/lib/DebugInfo/DWARF/DWARFGdbIndex.cpp:141-148
> +  uint32_t TuListSize = (AddressAreaOffset - TuListOffset) / 24;
>    TuList.resize(TuListSize);
>    for (uint32_t I = 0; I < TuListSize; ++I) {
>      uint64_t CuOffset = Data.getU64(&Offset);
>      uint64_t TypeOffset = Data.getU64(&Offset);
>      uint64_t Signature = Data.getU64(&Offset);
>      TuList[I] = {CuOffset, TypeOffset, Signature};
> ----------------
> Is this loop still untested (since all the test cases have TuListSize of
> zero - so the body of this loop could be incorrect & no test would diagnose
> it? (eg: if you put "assert(false)" in the loop, does it fire?)
>
> For test cases of this feature, you could either construct one by hand
> writing assembly - or it's possible (& probably better to check the format
> agrees with gdb) by using gdb to generate the index:
> https://www-zeuthen.desy.de/unix/unixguide/infohtml/gdb/Index-Files.html
>
>
> Repository:
>   rL LLVM
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D63537/new/
>
> https://reviews.llvm.org/D63537
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190624/4adfb260/attachment.html>


More information about the llvm-commits mailing list