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

Closure Conversion - LLVM Execution Error #118

Closed
NeuralCoder3 opened this issue Oct 14, 2022 · 0 comments
Closed

Closure Conversion - LLVM Execution Error #118

NeuralCoder3 opened this issue Oct 14, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@NeuralCoder3
Copy link
Collaborator

NeuralCoder3 commented Oct 14, 2022

In some cases, the emitted LLVM Code writes and loads functions from a wrong slot resulting in an infinite loop.

Example:
https://github.com/NeuralCoder3/thorin2/blob/closure-test/lit/clos/bind.thorin

Commands:

%thorin -d clos %s --output-ll %t.ll -o -
clang++ lit/clos/lib.cpp %t.ll -o %t -lc -Wno-override-module

Observed bahvior:
An infinite stream of 99 is printed.

Expected behavior:
A countdown from 99 to 0.

@NeuralCoder3 NeuralCoder3 changed the title Closure Conversion - LLVM Emission Error Closure Conversion - LLVM Execution Error Oct 14, 2022
@NeuralCoder3 NeuralCoder3 added the bug Something isn't working label Oct 14, 2022
@leissa leissa self-assigned this Oct 14, 2022
leissa added a commit that referenced this issue Oct 24, 2022
@leissa leissa mentioned this issue Oct 24, 2022
@leissa leissa closed this as completed in 28559ef Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants