[Lldb-commits] [PATCH] D66398: 2/2: Fix `TestDataFormatterStdList` regression
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Aug 18 13:22:17 PDT 2019
jankratochvil created this revision.
jankratochvil added reviewers: JDevlieghere, labath, jingham, clayborg.
jankratochvil added a project: LLDB.
Herald added a reviewer: jdoerfert.
jankratochvil added a parent revision: D66392: 1/2: D66174 `RegularExpression` follow-up/cleanup.
Since D66174 <https://reviews.llvm.org/D66174> I see failures of `TestDataFormatterStdList` in about 50% of runs on Fedora 30 x86_64 libstdc++.
I have found out that LLDB internally expects these `RegularExpression`s to be matched in their alphabetical order:
But since D66174 <https://reviews.llvm.org/D66174> they are sometimes matched in reverse order. A simple ugly workaround is to just sort it for ite
ration <https://people.redhat.com/jkratoch/lldb-formatters-sorted.patch>. The overlapping matches one can see by another debug patch on top of it <https://people.redhat.com/jkratoch/lldb-regex-duplicate.patch>.
In fact it was only some luck it worked before as there is internally `std::map<lldb::RegularExpressionSP, FormatterImpl>` (`FormattersContainer`).
So I have changed the key `RegularExpressionSP` -> `RegularExpression` and moved it everywhere as rvalue where possible (so that I am not accused of a performance regression; except for 2 cases needing real copy-ctor).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 30496 bytes
Desc: not available
More information about the lldb-commits