Move the delta stats into the generate resolve callback in TextGenerator::Generate
Categories
(Core :: Machine Learning: On Device, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox160 | --- | wontfix |
| firefox161 | --- | wontfix |
| firefox162 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 external file)
Coverity CID 1702186 (COPY_INSTEAD_OF_MOVE).
TextGenerator::Generate (toolkit/components/ml/textgeneration/TextGenerator.cpp) creates auto stats = std::make_shared<DeltaStats>(), hands one reference to MakeDeltaHandler, then captures stats by copy in the SendGenerate()->Then() resolve lambda. Nothing reads the local afterwards, so stats = std::move(stats) saves an atomic refcount increment/decrement per generation. Trivial and mechanical.
Comment 1•17 days ago
|
||
Set release status flags based on info from the regressing bug 2046983
:vpollet, since you are the author of the regressor, bug 2046983, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 2•17 days ago
|
||
The handler set by SetDeltaHandler() holds its own reference to stats, and
nothing reads the local after the capture, so the capture can take it rather
than bump the shared_ptr refcount.
Updated•17 days ago
|
Updated•17 days ago
|
Updated•17 days ago
|
Comment 4•17 days ago
|
||
| bugherder | ||
Description
•