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

Fix decimal form conversion (minimal newlib example) #140

Closed
danieldietsch opened this issue Mar 23, 2017 · 0 comments
Closed

Fix decimal form conversion (minimal newlib example) #140

danieldietsch opened this issue Mar 23, 2017 · 0 comments

Comments

@danieldietsch
Copy link
Member

danieldietsch commented Mar 23, 2017

//#Safe
/**
 * DD 23.3.17
 * This input produces StringIndexOutOfBoundsException in cacsl2boogietranslator. 
 * Issue only occurs with decimal form and multi-declaration (int a,b;) 
 *
 */

int one = 1.00000000000000000000e+00, pi;

int main()
{
    return pi;
}

Stacktrace

[2017-03-23 08:35:37,234 FATAL L292        ToolchainWalker]: The Plugin de.uni_freiburg.informatik.ultimate.plugins.generator.cacsl2boogietranslator has thrown an exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: 2
	at java.lang.String.substring(String.java:1963)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.util.ISOIEC9899TC3.getDecimalForm(ISOIEC9899TC3.java:255)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.util.ISOIEC9899TC3.handleFloatConstant(ISOIEC9899TC3.java:194)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.expressiontranslation.AExpressionTranslation.translateFloatingLiteral(AExpressionTranslation.java:235)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.expressiontranslation.AExpressionTranslation.translateLiteral(AExpressionTranslation.java:123)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.CHandler.visit(CHandler.java:1079)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.PRDispatcher.dispatch(PRDispatcher.java:309)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.CHandler.visit(CHandler.java:2290)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.PRDispatcher.dispatch(PRDispatcher.java:297)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.result.CDeclaration.translateInitializer(CDeclaration.java:139)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.CHandler.visit(CHandler.java:791)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.PRDispatcher.dispatch(PRDispatcher.java:191)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.CHandler.processTUchild(CHandler.java:543)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.CHandler.visit(CHandler.java:456)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.PRDispatcher.dispatch(PRDispatcher.java:188)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.PRDispatcher.dispatch(PRDispatcher.java:180)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.implementation.base.MainDispatcher.preRun(MainDispatcher.java:358)
	at de.uni_freiburg.informatik.ultimate.cdt.translation.interfaces.Dispatcher.run(Dispatcher.java:197)
	at de.uni_freiburg.informatik.ultimate.plugins.generator.cacsl2boogietranslator.CACSL2BoogieTranslatorObserver.doTranslation(CACSL2BoogieTranslatorObserver.java:252)
	at de.uni_freiburg.informatik.ultimate.plugins.generator.cacsl2boogietranslator.CACSL2BoogieTranslatorObserver.finish(CACSL2BoogieTranslatorObserver.java:201)
	at de.uni_freiburg.informatik.ultimate.core.coreplugin.PluginConnector.runObserver(PluginConnector.java:168)
	at de.uni_freiburg.informatik.ultimate.core.coreplugin.PluginConnector.runTool(PluginConnector.java:151)
	at de.uni_freiburg.informatik.ultimate.core.coreplugin.PluginConnector.run(PluginConnector.java:128)
	at de.uni_freiburg.informatik.ultimate.core.coreplugin.ToolchainWalker.executePluginConnector(ToolchainWalker.java:232)
	at de.uni_freiburg.informatik.ultimate.core.coreplugin.ToolchainWalker.processPlugin(ToolchainWalker.java:226)
	at de.uni_freiburg.informatik.ultimate.core.coreplugin.ToolchainWalker.walkUnprotected(ToolchainWalker.java:142)
	at de.uni_freiburg.informatik.ultimate.core.coreplugin.ToolchainWalker.walk(ToolchainWalker.java:104)
	at de.uni_freiburg.informatik.ultimate.core.coreplugin.ToolchainManager$Toolchain.processToolchain(ToolchainManager.java:283)
	at de.uni_freiburg.informatik.ultimate.core.coreplugin.toolchain.DefaultToolchainJob.runToolchainDefault(DefaultToolchainJob.java:221)
	at de.uni_freiburg.informatik.ultimate.core.coreplugin.toolchain.BasicToolchainJob.run(BasicToolchainJob.java:133)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants