#1751 closed defect (fixed)
Wrong code generation for getEnvironmentVariable
Reported by: | mburisch | Owned by: | mburisch |
---|---|---|---|
Priority: | high | Milestone: | 1.9.0 |
Component: | Run-time | Version: | |
Keywords: | Cc: | mburisch |
Description
The implementation of the function Modelica.Utilities.System.getEnvironmentVariable() seems to be different from the definition within Modelica.
Modelica definition:
external "C" ModelicaInternal_getenv(name, convertToSlash, content, exist)
OpenModelica definition:
const char* ModelicaInternal_getenv(const char* name, int convertToSlash, int* exist)
If the function is used from within a model it is called with four parameters, however it does only expects three thus leading to a crash.
Change History (4)
comment:1 by , 13 years ago
Cc: | mburisch, → mburisch |
---|---|
Component: | → Backend |
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 12 years ago
Milestone: | → 1.9.0 |
---|
comment:4 by , 12 years ago
Component: | Backend → Run-time |
---|
Note:
See TracTickets
for help on using tickets.
I fixed this in r12083 and added a bug report at https://trac.modelica.org/Modelica/ticket/761 since the error originates in the MSL sources.