standalone: fix __nac3_raise def in demo.c #462

Merged
sb10q merged 1 commits from fix-standalone-nac3-raise into master 2024-07-18 11:27:27 +08:00
Collaborator

nac3standalone/demo/demo.c's __nac3_raise's interface is wrong. PR to fix.

Also fixes #457 - the output inconsistency most likely stems from __nac3_raise inappropriately interpreting on differently generated code after optimization.

Example output with the new __nac3_raise as follows...

Source code:

# File: nac3standalone/demo/src/_test.py
def run() -> int32:
    i = 1
    j = 2
    assert i == j
    return 0

Output with cargo build && ./run_demo.sh --debug src/_test.py:

__nac3_raise called. Exception details:
          ID: 0
    Location: src/_test.py:5:5
    Function: run
     Message: ""
      Params: {0}=0, {1}=0, {2}=0

Previously it's just garbage data:

__nac3_raise(state: 4294941504, exception_object: 4294941896, context: 4294941912)
`nac3standalone/demo/demo.c`'s `__nac3_raise`'s interface is wrong. PR to fix. Also fixes https://git.m-labs.hk/M-Labs/nac3/issues/457 - the output inconsistency most likely stems from `__nac3_raise` inappropriately interpreting on differently generated code after optimization. Example output with the new `__nac3_raise` as follows... Source code: ``` # File: nac3standalone/demo/src/_test.py def run() -> int32: i = 1 j = 2 assert i == j return 0 ``` Output with `cargo build && ./run_demo.sh --debug src/_test.py`: ``` __nac3_raise called. Exception details: ID: 0 Location: src/_test.py:5:5 Function: run Message: "" Params: {0}=0, {1}=0, {2}=0 ``` Previously it's just garbage data: ``` __nac3_raise(state: 4294941504, exception_object: 4294941896, context: 4294941912) ```
lyken requested review from derppening 2024-07-17 21:17:04 +08:00
Author
Collaborator

Oops

Accidentally committed with a different user

Oops Accidentally committed with a different user
lyken force-pushed fix-standalone-nac3-raise from 60e46e17c4 to 1a31a50b8a 2024-07-17 21:22:19 +08:00 Compare
sb10q merged commit 1a31a50b8a into master 2024-07-18 11:27:27 +08:00
sb10q deleted branch fix-standalone-nac3-raise 2024-07-18 11:27:28 +08:00
Sign in to join this conversation.
No reviewers
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#462
No description provided.