WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
244008
Leak of id<MTLArgumentEncoder> in rx::(anonymous)::InitArgumentBufferEncoder()
https://bugs.webkit.org/show_bug.cgi?id=244008
Summary
Leak of id<MTLArgumentEncoder> in rx::(anonymous)::InitArgumentBufferEncoder()
David Kilzer (:ddkilzer)
Reported
2022-08-16 14:04:36 PDT
Leak of id<MTLArgumentEncoder> in rx::(anonymous)::InitArgumentBufferEncoder(). The struct is defined like this in ProgramMtl.h: ``` struct ProgramArgumentBufferEncoderMtl { void reset(ContextMtl *contextMtl); mtl::AutoObjCPtr<id<MTLArgumentEncoder>> metalArgBufferEncoder; mtl::BufferPool bufferPool; }; ``` However the method doesn't adopt the object in ProgramMtl.mm, which causes it to be assigned with a +2 retain count: ``` void InitArgumentBufferEncoder(mtl::Context *context, id<MTLFunction> function, uint32_t bufferIndex, ProgramArgumentBufferEncoderMtl *encoder) { encoder->metalArgBufferEncoder = [function newArgumentEncoderWithBufferIndex:bufferIndex]; // LEAK! if (encoder->metalArgBufferEncoder) { encoder->bufferPool.initialize(context, encoder->metalArgBufferEncoder.get().encodedLength, mtl::kArgumentBufferOffsetAlignment, 0); } } ```
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-08-16 14:05:06 PDT
<
rdar://problem/98747531
>
David Kilzer (:ddkilzer)
Comment 2
2022-08-16 14:07:06 PDT
This regressed in commit 6b271237a02594f551ab5948d7d2951addfda81f (
232042@main
) on Dec 02, 2020.
David Kilzer (:ddkilzer)
Comment 3
2022-08-16 14:43:47 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/3380
EWS
Comment 4
2022-08-17 11:14:06 PDT
Committed
253525@main
(06f230986084): <
https://commits.webkit.org/253525@main
> Reviewed commits have been landed. Closing PR #3380 and removing active labels.
Kimmo Kinnunen
Comment 5
2022-08-18 03:48:51 PDT
https://chromium-review.googlesource.com/c/angle/angle/+/3834820
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug