Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep the endianness check when assertions are off for node #22391

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bvibber
Copy link
Collaborator

@bvibber bvibber commented Aug 16, 2024

Node.js has a big-endian s390 version which occasionally turns up; silent failure of an emscripten module used in a JavaScript library can be hard to debug.

Disabling node output and assertions will keep the check off. If the check sees a big-endian system, it will throw an error during initialization and this will be visible in debug logging, letting the affected downstream users know what's wrong and how they might fix or work around it.

Helps with: #12387

Node.js has a big-endian s390 version which occasionally turns
up; silent failure of an emscripten module used in a JavaScript
library can be hard to debug.

Disabling node output and assertions will keep the check off.
If the check sees a big-endian system, it will throw an error
during initialization and this will be visible in debug logging,
letting the affected downstream users know what's wrong and how
they might fix or work around it.

Helps with: emscripten-core#12387
// Endianness check
#if !SUPPORT_BIG_ENDIAN
// Note that s390 node *occasionally* pops up and is big-endian.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this?

Suggested change
// Note that s390 node *occasionally* pops up and is big-endian.
// Note that s390 node *occasionally* pops up and is big-endian, so we check for
// endianness when node is enabled, even when assertions are off (no browser
// platform is big-endian AFAWCT, so we don't do that on web-only builds, to
// save size there).

Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgmt % kripken comment

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.

3 participants