This issue tracker is closed. Please visit UPPAAL issue tracker at Github instead.

Bug 535 - struct in function break assertion
Summary: struct in function break assertion
Status: RESOLVED FIXED
Alias: None
Product: UPPAAL
Classification: Unclassified
Component: Engine (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Assignee: Alexandre David
URL:
Depends on:
Blocks:
 
Reported: 2012-03-20 16:48 CET by Marius Mikučionis
Modified: 2012-03-20 17:40 CET (History)
0 users

See Also:
Architecture:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Mikučionis 2012-03-20 16:48:41 CET
Suppose you have the following code:

typedef struct {
  int x, y;
} point_t;

int len = 0;
point_t list[5];

void hello(point_t i)
{
   list[len++] = i;
}


Uppaal dies with assertion in utap/type.cpp while parsing the struct arguments in function definition.
The problem is since revision 5006 where clock copying was introduced in verifier/Compiler.cpp:2282.
It seems that the code assumes that there can be only arrays of clocks, clocks cannot be in struct but then it chokes on struct of int.

The problem does not manifest in NDEBUG build, but I am not sure about the scope of the problem.
Comment 1 Marius Mikučionis 2012-03-20 17:40:07 CET
fixed in revision 5025