ForNeVeR / ForNeVeR/Cesium

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

Open
#586 0 comments 0 reactions 0 assignees View on GitHub
area:infrastructure kind:bug status:help-wanted
Dominant language
C#
Stars
451
Forks
49
Avg merge
13h 59m
Merged PRs (30d)
6

Description

We've used to have a following test: https://github.com/ForNeVeR/Cesium/blob/67d2c81c8d06db59f8448f160a9cf63f8a607b75/Cesium.IntegrationTests/stdlib/printf.c#L24-L26

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.