Skip to content

Conversation

@bnoordhuis
Copy link
Contributor

MSVC apparently doesn't merge adjacent bit fields if they don't have the same type. Change the uint8_t fields to uint32_t.

It was reported that sizeof(JSString) was 48 bytes on Windows but it should be 40 bytes now, like it is on x86_64 Linux.

Fixes: #1250

MSVC apparently doesn't merge adjacent bit fields if they don't have
the same type. Change the uint8_t fields to uint32_t.

It was reported that `sizeof(JSString)` was 48 bytes on Windows but it
should be 40 bytes now, like it is on x86_64 Linux.

Fixes: quickjs-ng#1250
@bnoordhuis bnoordhuis merged commit 1f5f591 into quickjs-ng:master Dec 1, 2025
128 checks passed
@bnoordhuis bnoordhuis deleted the fix1250 branch December 1, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSString layout is broken

2 participants