Skip to content

fix(NODE-6818): flip byte order depending on system endianness #766

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

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

nbbeeken
Copy link
Contributor

@nbbeeken nbbeeken commented Mar 5, 2025

Description

What is changing?

Is there new documentation needed for these changes?

What is the motivation for this change?

Release Highlight

Fixed float byte-wise handling on big-endian systems

Caution

Among the platforms BSON and the MongoDB driver support this issue impacts s390x big-endian systems. x86, ARM, and other little-endian systems are not affected. Existing versions of the driver can be upgraded to this release.

A recent change to the BSON library started parsing and serializing floats using a Float64Array. When reading the bytes from this array the ordering is dependent on the platform it is running on and we now properly account for that ordering.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@nbbeeken
Copy link
Contributor Author

nbbeeken commented Mar 5, 2025

@nbbeeken nbbeeken marked this pull request as ready for review March 5, 2025 23:08
@nbbeeken nbbeeken force-pushed the NODE-6818-fix-endian branch from 36cc388 to d0f8891 Compare March 5, 2025 23:08
@baileympearson baileympearson merged commit 8a55718 into v6.4.x Mar 5, 2025
1 check failed
@baileympearson baileympearson deleted the NODE-6818-fix-endian branch March 5, 2025 23:10
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.

2 participants