Skip to content

Commit

Permalink
Fix assertion failure in pas_enumerator_create due to wrong alignment
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=270993
rdar://124562475

Reviewed by Yusuke Suzuki.

In pas_enumerator_create, we assert that the payload of a pas_enumerator_region
is aligned to PAS_INTERNAL_MIN_ALIGN. This patch adds that alignment requirement
to the type definition of pas_enumerator_region so we always respect this
requirement.

* Source/bmalloc/libpas/src/libpas/pas_enumerator_region.h:

Canonical link: https://commits.webkit.org/276187@main
  • Loading branch information
ddegazio committed Mar 15, 2024
1 parent 6e8334e commit 5aa1396
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/bmalloc/libpas/src/libpas/pas_enumerator_region.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct pas_enumerator_region {
pas_enumerator_region* previous;
size_t size;
size_t offset;
uint64_t payload[1];
PAS_ALIGNED(PAS_INTERNAL_MIN_ALIGN) uint64_t payload[1];
};

PAS_API void* pas_enumerator_region_allocate(pas_enumerator_region** region_ptr,
Expand Down

0 comments on commit 5aa1396

Please sign in to comment.