Opened 4 years ago
Last modified 3 years ago
#6161 accepted defect
[FMI] FMU with string parameters will crash if a memory pool collection happens
Reported by: | Adrian Pop | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | FMI | Version: | |
Keywords: | Cc: | Andreas Heuermann, Martin Sjölund |
Description
The memory pool frees the string parameters which it shouldn't do.
We need a way to alloc and save the string parameters so that we can free them properly, but only when the FMU is terminated.
Change History (6)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:3 by , 4 years ago
Cc: | added |
---|
We could generate the matching free call to '<%str%> = mmc_mk_scon_persist(<%initVal(v)%>); and evaluate it when fmi2FreeInstance is called.
Also we need to free strings before assigning new values to them.
Maybe we need to change the memory handling for strings even more.
comment:5 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
Note:
See TracTickets
for help on using tickets.
For now I will fix this by allocating string parameters using
mmc_mk_scon_persist
, we should fix this properly later. We need to save and free these on per FMU instance basis.