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

Carbon crash #421

Open
pieter-bos opened this issue Jun 21, 2022 · 0 comments
Open

Carbon crash #421

pieter-bos opened this issue Jun 21, 2022 · 0 comments

Comments

@pieter-bos
Copy link

Hi! I managed to crash carbon with this input:

method m()
{
  label start
  goto start

  while(true) {  }
}

Which reports:

carbon 1.0
Exception in thread "main" java.lang.RuntimeException: While loop is not a loop head
	at scala.sys.package$.error(package.scala:27)
	at viper.carbon.modules.impls.DefaultLoopModule.getWhileInformation(DefaultLoopModule.scala:416)
	at viper.carbon.modules.impls.DefaultLoopModule.handleWhile(DefaultLoopModule.scala:426)
	at viper.carbon.modules.impls.DefaultLoopModule.$anonfun$handleStmtLoopDetector$1(DefaultLoopModule.scala:484)
(...)
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

2 participants