Skip to content

incorrect return value for atexit/on_exit #734

@ZERICO2005

Description

@ZERICO2005

atexit and on_exit are supposed to return 0 on success, and non-zero on failure.
Currently they return non-zero on failure, and the caller return address on success (since the function returns via jp (hl))
https://en.cppreference.com/w/c/program/atexit

additionally, on_exit functions are supposed to have the value from exit passed into them, but it appears that it is currently a pointer in ram to garbage data, or just directly garbage data if you return from main.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions