RESOLVED FIXED 225080
UnlinkedCodeBlock should have better accounting for extra memory
https://bugs.webkit.org/show_bug.cgi?id=225080
Summary UnlinkedCodeBlock should have better accounting for extra memory
Keith Miller
Reported 2021-04-26 16:28:23 PDT
UnlinkedCodeBlock should have better accounting for extra memory
Attachments
Patch (3.85 KB, patch)
2021-04-26 16:30 PDT, Keith Miller
no flags
Patch for landing (4.79 KB, patch)
2021-04-26 16:50 PDT, Keith Miller
no flags
Keith Miller
Comment 1 2021-04-26 16:30:30 PDT
Mark Lam
Comment 2 2021-04-26 16:33:09 PDT
Comment on attachment 427101 [details] Patch r=me
Yusuke Suzuki
Comment 3 2021-04-26 16:34:05 PDT
Comment on attachment 427101 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427101&action=review > Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:119 > +size_t UnlinkedCodeBlock::RareData::sizeInBytes() const Let's take a locker parameter to ensure that this is accessed while taking a lock.
Yusuke Suzuki
Comment 4 2021-04-26 16:35:29 PDT
Comment on attachment 427101 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427101&action=review >> Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:119 >> +size_t UnlinkedCodeBlock::RareData::sizeInBytes() const > > Let's take a locker parameter to ensure that this is accessed while taking a lock. And can you ensure that these fields are initialized while taking a lock?
Keith Miller
Comment 5 2021-04-26 16:49:48 PDT
Comment on attachment 427101 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427101&action=review >>> Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:119 >>> +size_t UnlinkedCodeBlock::RareData::sizeInBytes() const >> >> Let's take a locker parameter to ensure that this is accessed while taking a lock. > > And can you ensure that these fields are initialized while taking a lock? Done, and it did look like there were a few places where the initializer was not holding the lock... I fixed those.
Keith Miller
Comment 6 2021-04-26 16:50:16 PDT
Created attachment 427105 [details] Patch for landing
EWS
Comment 7 2021-04-26 18:10:07 PDT
Committed r276625 (237053@main): <https://commits.webkit.org/237053@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427105 [details].
Radar WebKit Bug Importer
Comment 8 2021-04-26 18:11:20 PDT
Note You need to log in before you can comment on or make changes to this bug.