|Summary:||Engine crashes when control reaches end of non-void function|
|Product:||UPPAAL||Reporter:||Lars T. Mikkelsen <ltm>|
|Component:||Engine||Assignee:||Gerd Behrmann <behrmann>|
Description Lars T. Mikkelsen 2007-02-27 11:54:03 CET
It's possible to create a non-void function that won't return a value. When such a function is called the engine crashes. Reproducible: Always Steps to Reproduce: 1. Open the attached system in UPPAAL 2. Switch to the Simulator view Actual Results: The engine crashes and the GUI receives a "java.io.IOException: Server connection lost" exception. Expected Results: The engine shouldn't crash. In best case the syntax checker should warn that control may reach end of the non-void function.
Comment 2 Gerd Behrmann 2007-02-27 14:24:29 CET
Confirmed. To be fair, UPPAAL does check for the presence of a return statement, but apparently there is a bug that makes it possible to fool it (as demonstrated by your model).
Comment 3 Gerd Behrmann 2007-02-28 22:04:04 CET
The problem is triggered by the if-statement not having an else case.
Comment 4 Gerd Behrmann 2007-02-28 22:05:05 CET
Resolved on the 4.0 branch from rev. 2982.
Comment 5 Lars T. Mikkelsen 2007-03-15 10:00:52 CET
Fix confirmed in 4.0.6.
Comment 6 Gerd Behrmann 2007-03-15 10:31:29 CET
The bug is not yet fixed in other branches than 4.0.