Skip to content

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

@ForNeVeR

Description

@ForNeVeR

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:infrastructureRepository infrastructure: build, test scripts etc.kind:bugSomething isn't workingstatus:help-wantedOpen for contributors

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions