Bug 235423 - [libpas] Ensure pas_allocation_callback and pas_deallocation_callback are initialized as NULL
Summary: [libpas] Ensure pas_allocation_callback and pas_deallocation_callback are ini...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-20 16:07 PST by Yusuke Suzuki
Modified: 2022-01-21 14:14 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.93 KB, patch)
2022-01-20 16:08 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (2.94 KB, patch)
2022-01-20 16:09 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2022-01-20 16:07:01 PST
[JSC] Ensure pas_allocation_callback and pas_deallocation_callback are initialized as NULL
Comment 1 Yusuke Suzuki 2022-01-20 16:08:20 PST
Created attachment 449618 [details]
Patch
Comment 2 Yusuke Suzuki 2022-01-20 16:09:55 PST
Created attachment 449619 [details]
Patch
Comment 3 Mark Lam 2022-01-20 16:11:51 PST
Comment on attachment 449619 [details]
Patch

r=me
Comment 4 EWS 2022-01-20 17:37:50 PST
Committed r288339 (246245@main): <https://commits.webkit.org/246245@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 449619 [details].
Comment 5 Radar WebKit Bug Importer 2022-01-20 17:38:18 PST
<rdar://problem/87859879>
Comment 6 Filip Pizlo 2022-01-20 18:47:13 PST
Comment on attachment 449619 [details]
Patch

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

> Source/bmalloc/libpas/src/libpas/pas_allocation_callbacks.c:33
> +pas_allocation_callback_t pas_allocation_callback = NULL;
> +pas_deallocation_callback_t pas_deallocation_callback = NULL;

The "_t" suffix isn't used by any types in libpas other than this.  I think that the way that I would normally do this is call the type "pas_allocation_callback" and call the variable "pas_allocation_callback_instance".  Saying "pas_allocation_callback_type" could be cool too.
Comment 7 Yusuke Suzuki 2022-01-21 14:00:07 PST
Committed r288381 (246278@trunk): <https://commits.webkit.org/246278@trunk>
Comment 8 Yusuke Suzuki 2022-01-21 14:14:58 PST
(In reply to Filip Pizlo from comment #6)
> Comment on attachment 449619 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=449619&action=review
> 
> > Source/bmalloc/libpas/src/libpas/pas_allocation_callbacks.c:33
> > +pas_allocation_callback_t pas_allocation_callback = NULL;
> > +pas_deallocation_callback_t pas_deallocation_callback = NULL;
> 
> The "_t" suffix isn't used by any types in libpas other than this.  I think
> that the way that I would normally do this is call the type
> "pas_allocation_callback" and call the variable
> "pas_allocation_callback_instance".  Saying "pas_allocation_callback_type"
> could be cool too.

Changed the typenames.