feature: support more than 64 native attributes#213
Conversation
melekr
left a comment
There was a problem hiding this comment.
Nice change @KishanPRao, moving dynamic attributes off SimpleStringDictionary is the right direction and should remove the 64 entry limit.
I'm adding a few small correctness/edge-case notes below, mostly around making the new behaviour explicit and covered by tests, should be straightforward to address.
|
Crashpad still caps annotation list at kMaxNumberOfAnnotations, currently Could we update the PR wording/comments to something like “supports more than 64 dynamic attributes” or “supports dynamically allocated attributes up to Crashpad’s annotation list read limit”? |
a regression test proving 65+ dynamic attributes make it into the native report/upload can be useful here. If we want a runtime guard to make the behaviour less surprising, something along these lines could work: |
…g if number of entries cross crashpad max
Since we'd need to add an entire gtest suite, for native testing, I'd handle this separately, at a later point. |
Summary
Removes the 64-entry limit on native (Crashpad) attributes.
Previously, a simple dictionary was used for storing attributes, which limits the total count to 64 entries. They are now stored in Crashpad's global
AnnotationList.The attribute count is limited by Crashpad's internal limit,
kMaxNumberOfAnnotations.SetAnnotationwill refuse to add keys beyond the limit, providing feedback with a warning.Changes
SimpleStringDictionary, and replaces it withAnnotationList. This data is dynamically allocated.addAttribute.ref: BT-6868