-
-
Notifications
You must be signed in to change notification settings - Fork 415
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 when trying to compile incorrect capabilities #4344
Comments
Please post the code that you are reporting. It's not completely clear what changes are required to replicate the issue. |
Hi Sean, I'm somewhat flabbergasted. The posted code in the original comment crashes ponyc when adding a Hoping I'm not the crazy one! Best, |
Kyle can you please post the complete code that crashes rather than a description of changes to code that is required to cause the situation? |
Hi Sean, It might sound crazy, but I actually did post the entire code that reproduces the issue in the first post. Any chance you can place the code in a test.pony file and try the edit I suggested? |
No it doesn't… actor Main
new create() =>
let c: T iso = TClass.create(l)
let a: Act = Act.create(c)
|
The code you originally posted doesn't compile. We can't correct it to make it compile to follow your suggested edit because your problem description is related to incorrect capabilities. We need to know what you compiled. Also - can you confirm which version of ponyc you're using please? |
I also noticed that your constructor for Main isn't correct either: actor Main
new create() => // Should be new create(env: Env) => |
Policing the code isn't helpful. Just run it.
|
It's not policing code when what you originally provided (after edit) is this: let c: T iso^ = TClass.create(l) Which gives me:
Wheres in your last comment which actually illustrates the bug you have: let c: T iso^ = TClass.create("") So no, your original report, even after your requested edit did not replicate the compiler error. However, your last comment (in which you actually provided the information we explicitly asked for - thank you) - did provide a version I could replicate the issue with. So how about we take a step back from the inflammatory language and start again? |
Ah, I see the mistake. I apologize for the unforgiving attitude and unkind words. I should have read your first response more carefully and then I could have corrected the original. |
@redvers can you post the complete code for this bug? |
@redvers ping. see above. |
I stumbled on this while searching for clues on a similar (but unfortunately not identical) error.
Fails with
Using version 0.58.1-fe3895eb from the most recent release tag, running on Ubuntu 20.04 on Intel. |
A more minimal repro: actor Main
new create() =>
let c: String iso^ = String |
There's two things wrong with the minimal code:
So for either of these problems in isolation, the compiler will give you error messages correctly. It's only the combination of the two that gives the assertion failure encountered in this ticket. |
Adding a
^
tolet c: T iso = ...
causes a ponyc crash.The text was updated successfully, but these errors were encountered: