Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTIO exception parameters are broken #30

Closed
sbourdeauducq opened this issue Jun 18, 2015 · 4 comments
Closed

RTIO exception parameters are broken #30

sbourdeauducq opened this issue Jun 18, 2015 · 4 comments
Assignees

Comments

@sbourdeauducq
Copy link
Member

Stuck at 0, e.g.
artiq.coredevice.runtime_exceptions.RTIOUnderflow: at 0 ps on channel 0, violation 0 ps

@sbourdeauducq
Copy link
Member Author

The bug happens when exceptions that are raised with parameters by the runtime are caught by a try/finally construct in the compiled code. The finally block re-raises the exception through the runtime's exception_raise, which clears the parameters. Fixing this properly needs making the compiler aware of exception parameters - not clearing the parameters when the compiled code raises an exception is not enough, e.g.

try:
    ...
except SomeException:
    # This does need to clear the parameters
    # (and change the ID of the exception re-raised by finally) 
    raise SomeOtherException
finally:
    ...

This bug is manifesting itself all the time at the moment, as the whole kernel code is encapsulated in a try/finally construct to handle RTIO handovers.

@whitequark
Copy link
Contributor

new-py2llvm does not exhibit this bug.

@sbourdeauducq
Copy link
Member Author

Please close when new-py2llvm is usable with the rest of ARTIQ.

@whitequark
Copy link
Contributor

Closing since new compiler was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants