Bug: nac3standalone: __nac3_raise produces different outputs depending on optimization level #457

Closed
opened 2024-07-13 22:34:46 +08:00 by lyken · 0 comments
Collaborator

Not sure if this is actually normal behavior. If this is a real issue then the problem likely traces deeper into nac3core.

Reproduction

Create nac3standalone/demo/src/_test.py and put in:

def run() -> int32:
    x = np_ones((3, 4))[999]
    return 0

Running cargo build && ./run_demo.sh --debug -O0 src/_test.py produces:

__nac3_raise(state: 4294941600, exception_object: 1, context: 4206796)

Running cargo build && ./run_demo.sh --debug -O3 src/_test.py produces:

__nac3_raise(state: 4294941616, exception_object: 4294941992, context: 4294942008)

Notably, the exception_object value seems to be corrupted.

Not sure if this is actually normal behavior. If this is a real issue then the problem likely traces deeper into `nac3core`. ## Reproduction Create `nac3standalone/demo/src/_test.py` and put in: ```python def run() -> int32: x = np_ones((3, 4))[999] return 0 ``` Running `cargo build && ./run_demo.sh --debug -O0 src/_test.py` produces: ``` __nac3_raise(state: 4294941600, exception_object: 1, context: 4206796) ``` Running `cargo build && ./run_demo.sh --debug -O3 src/_test.py` produces: ``` __nac3_raise(state: 4294941616, exception_object: 4294941992, context: 4294942008) ``` Notably, the `exception_object` value seems to be corrupted.
lyken changed title from nac3standalone: `__nac3_raise` produces different outputs depending on optimization level to Bug: nac3standalone: `__nac3_raise` produces different outputs depending on optimization level 2024-07-13 22:35:05 +08:00
sb10q closed this issue 2024-07-18 11:27:35 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#457
No description provided.