Move instead of copy the CrashEventID string in CrashReporterHost::FinalizeCrashReport
Categories
(Core :: IPC, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox154 | --- | unaffected |
| firefox155 | --- | wontfix |
| firefox156 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 external file)
Coverity CID 1700061 (COPY_INSTEAD_OF_MOVE) flags ipc/glue/CrashReporterHost.cpp:99:
NSID_TrimBracketsASCII uuidString(nsID::GenerateUUID());
mExtraAnnotations[CrashReporter::Annotation::CrashEventID] = uuidString;
uuidString is a local that is dead after this statement, so it should be assigned with std::move rather than copied.
In practice this is cosmetic: NSID_TrimBracketsASCII is an nsAutoCStringN whose inline buffer is large enough for a UUID, so the move assignment still copies the characters and cannot steal the storage. The change is purely to express the intent correctly and to silence the checker.
Introduced by bug 2058676.
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
uuidString is dead after the assignment, so move it instead of copying.
Fixes Coverity CID 1700061 (COPY_INSTEAD_OF_MOVE).
Updated•2 months ago
|
Comment 4•2 months ago
|
||
The patch landed in nightly and beta is affected.
:Sylvestre, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox155towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•2 months ago
|
Description
•