Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#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 Martin Sjölund, 12 years ago

Cc: mburisch, → mburisch
Component: Backend

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.

comment:2 by Martin Sjölund, 12 years ago

Resolution: fixed
Status: newclosed

comment:3 by Martin Sjölund, 12 years ago

Milestone: 1.9.0

comment:4 by Martin Sjölund, 12 years ago

Component: BackendRun-time
Note: See TracTickets for help on using tickets.