Bug 241836 - Make sure return value of dispatch_source_create is memory managed correctly
Summary: Make sure return value of dispatch_source_create is memory managed correctly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-21 19:44 PDT by Alex Christensen
Modified: 2022-06-22 11:36 PDT (History)
6 users (show)

See Also:


Attachments
Patch (10.77 KB, patch)
2022-06-21 19:46 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (10.82 KB, patch)
2022-06-22 00:16 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (10.82 KB, patch)
2022-06-22 00:41 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (7.71 KB, patch)
2022-06-22 10:17 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2022-06-21 19:44:46 PDT
Most of the time we can use smart pointers.  This should make the leaks tool happier.
Comment 1 Alex Christensen 2022-06-21 19:44:55 PDT
rdar://95625990
Comment 2 Alex Christensen 2022-06-21 19:46:24 PDT
Created attachment 460402 [details]
Patch
Comment 3 Alex Christensen 2022-06-22 00:16:33 PDT
Created attachment 460406 [details]
Patch
Comment 4 Alex Christensen 2022-06-22 00:41:41 PDT
Created attachment 460409 [details]
Patch
Comment 5 Chris Dumez 2022-06-22 08:42:19 PDT
Comment on attachment 460409 [details]
Patch

r=me
Comment 6 David Kilzer (:ddkilzer) 2022-06-22 10:05:58 PDT
Comment on attachment 460409 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=460409&action=review

> Source/bmalloc/bmalloc/Scavenger.cpp:88
> +#if BPLATFORM(WATCHOS)
> +    // FIXME: This is concerning.
> +    static_assert(!__has_feature(objc_arc));
> +#else
> +    static_assert(__has_feature(objc_arc));
> +#endif

I'm not sure why ARC is disabled on watchOS as it's set to be enabled in Configurations/Base.xcconfig.
Comment 7 Alex Christensen 2022-06-22 10:12:13 PDT
The definition of BENABLE_LIBPAS is dependent on whether the CPU has 64-bit address spaces, and watchOS is the only EWS that is 32-bit and that code was inside #if !BUSE(LIBPAS)
Comment 8 Alex Christensen 2022-06-22 10:17:26 PDT
Created attachment 460418 [details]
Patch
Comment 9 EWS 2022-06-22 11:35:52 PDT
Committed r295740 (251745@main): <https://commits.webkit.org/251745@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 460418 [details].
Comment 10 Radar WebKit Bug Importer 2022-06-22 11:36:12 PDT
<rdar://problem/95709464>