Bug 1864960 - Make assertion about cache alignment of mark bits into a static_assert...
commite5b3731de32d4cbba3bbe7f6747c2767afc17b3d
authorJon Coppeard <jcoppeard@mozilla.com>
Sat, 18 Nov 2023 09:10:04 +0000 (18 09:10 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Sat, 18 Nov 2023 09:10:04 +0000 (18 09:10 +0000)
treed209a8288ba03e5eb29c9d5f2371676adcf94549
parent41e79c51f5c2b8469def606c5a32562e19c963d9
Bug 1864960 - Make assertion about cache alignment of mark bits into a static_assert r=sfink

The problem was the dynamic assertion ended up reading the chunk header in
Arena::checkAddress(), and for empty chunks we have told ASAN that shouldn't be
accessed by this point.

The fix is a more complicated set of static assertions to check everything is
aligned as we expect.

Differential Revision: https://phabricator.services.mozilla.com/D193779
js/src/gc/Heap.cpp
js/src/gc/Heap.h