-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Segfault in 'Simplify the CFG' pass with Pony 0.22.6 #2760
Comments
It would appear to be read code removing a giant chunk of the program and then getting angry. What was the last version of Pony that you know this compiled with? |
@burjui could you try to create a more minimal example? |
Here's a minimal example that I think is the same.
|
So the problem here is in genreference.c changing:
to
fixes the problem BUT... that would reopen this issue: #2662 |
@jemc @Praetonus I think this one is past my current compiler knowledge paygrade. |
changing the return type at the end of AND... the tests all pass, so, i'm going to open a PR for review. |
I don't know the compiler well and I went off what I knew and believe I found the root cause for our tuple bugs that started with 9222f08. Which was in turn fixing #2735. However, a number of bugs came from that fix because, it didn't fix the root issue. Which was `gen_localdecl` returning GEN_NOVALUE where GEN_NOTNEEDED was needed. This is why, prior to 9222f08, `gen_tuple` was returning GEN_NOTNEEDED when the value it has was GEN_NOVALUE. Fixes #2760
I tested the fix and it works, thank you. I have never seen bugfixes coming that soon after reporting an issue, wonderful! |
Found another case that causes a segfault even with the fix (tested on issue-2760 branch): actor Main
new create(env: Env) =>
let x: (None | U8) = 1
while true do
let _: None = match x
| let _: U8 => None
end
end $ ponyc
...
0. Running pass 'Simplify the CFG' on function '@Main_tag_create_oo'
[1] 18802 segmentation fault (core dumped) ponyc Same backtrace |
Interesting. Its looking like a different bug. But I need more time to triage. @burjui I might ask you to open a different issue. |
@burjui this is a different bug that appears in the same kind of way. can you open an issue for it? |
This existed at least as far back as 0.21.3 |
This goes back to the introduction of the |
Created an issue: #2767 |
I don't know the compiler well and I went off what I knew and believe I found the root cause for our tuple bugs that started with 9222f08. Which was in turn fixing #2735. However, a number of bugs came from that fix because, it didn't fix the root issue. Which was `gen_localdecl` returning GEN_NOVALUE where GEN_NOTNEEDED was needed. This is why, prior to 9222f08, `gen_tuple` was returning GEN_NOTNEEDED when the value it has was GEN_NOVALUE. Fixes #2760
Got a segfault compiling my hobby project on Arch Linux x86_64:
https://bitbucket.org/bytefu/funky/src/simplify-cfg-fail/
Though the segfault goes away after uncommenting the line 66 in
main.pony
:token_count = token_count + 1
GDB shows the following stacktrace:
The text was updated successfully, but these errors were encountered: