Skip to content

emscripten_get_orientation_status breaks with ASSERTIONS #21447

Closed
@cwoffenden

Description

@cwoffenden

Tested with the latest main (6105e76) and 3.1.55 Emscripten. A simple repro is:

#include <emscripten/html5.h>

int main() {
	EmscriptenOrientationChangeEvent e;
	emscripten_get_orientation_status(&e);
}

Build with: emcc -O0 -g3 -s ASSERTIONS=2 -o index.html test.c

This is also part of the existing HTML5 tests:

ret = emscripten_get_orientation_status(&oce);

A pre-built version of the simple repro can be seen here:

https://wip.numfum.com/2024-02-28/emscripten/orientation-status/index.html

The error being:

[Error] Aborted(Assertion failed: value (-2147483648) too small to write as 32-bit value)
[Error] RuntimeError: Aborted(Assertion failed: value (-2147483648) too small to write as 32-bit value)

A fix was put in #21428. This breaks for the same reason as #21362.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions