[PATCH] D43092: [DebugInfo] Prevent infinite recursion for malformed DWARF
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 30 09:23:19 PDT 2018
aprantl accepted this revision.
aprantl added a comment.
Thanks for checking!
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDie.cpp:300
+ std::vector<DWARFDie> Worklist;
+ SmallSet<DWARFDie, 3> Seen;
+ Worklist.push_back(*this);
----------------
Perhaps add a comment explaining that this avoids infinite recursion on malformed input and empirically we never have a depth>3 ?
https://reviews.llvm.org/D43092
More information about the llvm-commits
mailing list