Skip to content

[bug] : Dereferencing a null pointer allowed for Emscripten xeus-cpp kernel #438

@mcbarton

Description

@mcbarton

If I run the following in the deployment I will get 0 returned to the notebook.

#include <iostream>

int main() {
    int* ptr = nullptr;
    std::cout << *ptr; 
    return 0;
}
main();

e.g.

Image

Whereas if I was to compile this code

#include <iostream>

int main() {
    int* ptr = nullptr;
    std::cout << *ptr; 
    return 0;
}

and try to run it locally (on a native platform), I get a segmentation fault as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions