﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4904	Creating ExternalObject with constant arguments can generate bad code	Per Östlund	Lennart Ochel	"Creating e.g. an ExternalCombiTimeTable using constant arguments like this:
{{{#!mo
model M
  Modelica.Blocks.Types.ExternalCombiTimeTable tableID =
    Modelica.Blocks.Types.ExternalCombiTimeTable(
      ""test"", ""test"", {{1, 2}, {3, 4}}, 0.0, {1},
      Modelica.Blocks.Types.Smoothness.LinearSegments,
      Modelica.Blocks.Types.Extrapolation.LastTwoPoints);
end M;
}}}
will cause the simulation to segfault due to a call in the generated code for the constructor:
{{{#!mo
  pack_integer_array(&_columns);
}}}
The issue seems to be that {{{pack_integer_array}}} modifies the array instead of creating a new array, but the given array in this case is a #DEFINE'd literal that can't be modified."	defect	closed	normal	Future	Code Generation	v1.13.0-dev-nightly	fixed		
