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

Investigate what's up with printf("%lu", -1) #586

Open
ForNeVeR opened this issue Apr 30, 2024 · 0 comments
Open

Investigate what's up with printf("%lu", -1) #586

ForNeVeR opened this issue Apr 30, 2024 · 0 comments
Labels
area:infrastructure Repository infrastructure: build, test scripts etc. kind:bug Something isn't working status:help-wanted Open for contributors

Comments

@ForNeVeR
Copy link
Owner

ForNeVeR commented Apr 30, 2024

We've used to have a following test:

if (printf("%lu\n", -1) != 11) {
return -5;
}

It was, to my surprise, portable across all the platforms: on Windows, Linux and macOS agents we run on, it was printing 4294967295 in all compilers Cesium, GCC and MSVC.

But this is wrong!

On LP64 platforms (Linux and macOS) it ought to be printing 18446744073709551615.

And it started to do so, but only on macOS and only since 2024-04-28 (perhaps after macos-latest has migrated to AARCH64?). On Linux, it still emulates LLP64 it seems?

And Cesium should always be printing this number, since it is an LP64 compiler (this I've fixed in #585).

We should:

  • figure out what the hell happens and why does our Linux agent still emulate LLP64 (is it 32-bit? would be crazy),
  • fix the test portability (see TODO[#586]) and re-enable the test.
@ForNeVeR ForNeVeR added kind:bug Something isn't working status:help-wanted Open for contributors area:infrastructure Repository infrastructure: build, test scripts etc. labels Apr 30, 2024
ForNeVeR added a commit that referenced this issue Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:infrastructure Repository infrastructure: build, test scripts etc. kind:bug Something isn't working status:help-wanted Open for contributors
Projects
None yet
Development

No branches or pull requests

1 participant