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

Object function fails to compile when starting with endless loop #15

Open
ursgraf opened this issue Feb 9, 2023 · 2 comments
Open

Object function fails to compile when starting with endless loop #15

ursgraf opened this issue Feb 9, 2023 · 2 comments

Comments

@ursgraf
Copy link
Contributor

ursgraf commented Feb 9, 2023

@ursgraf
Copy link
Contributor Author

ursgraf commented Feb 9, 2023

while (true) {
IntPacket.Type type = wifi.intPacket.readInt();           
if (null == null) break;           
if (type == IntPacket.Type.None) break;
produces an internal error during: "Launching MusterLsg.deep". Cannot invoke "Object.equals(Object)" because "this.idom" is null
when if(null == null) comes before readInt() it works fine

@ursgraf
Copy link
Contributor Author

ursgraf commented Apr 6, 2023

What happens? Let's look at another example:
int c;
Object o;
public void m3() {
while (true) {
if (null == null) {c = 100;}
else if (o == null) {c = 200; break;}
}
}

the cfg is determined to be:
CFGNode nr:0 [0:6], is loop header, bckwd branches=1, idom=null, ref=1, visited:false
predecessor: [0:6]
successor: [0:6]

CFGNode nr:1 [16:23], idom=null, ref=0, visited:false
predecessor:
successor:

That looks reasonable: the first node is an endless loop with no connection to the second node. When calculating the SSA these nodes get sorted which fails in that particular case

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

No branches or pull requests

1 participant