Skip to content

Callback member initialisation. #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 26, 2022
Merged

Callback member initialisation. #59

merged 2 commits into from
Jan 26, 2022

Conversation

davidhjp01
Copy link
Contributor

I found that stepFinished is not initialised here and it may be initialised to a garbage number (non-zero) depending on the compiler/platform etc. It seems some of the fmus may check if the function is initialised (if it is zero or not) and calling it resulted in crashing proxyfmu.

This patch just adds nullptr to stepFinished to avoid this issue.

@markaren
Copy link
Collaborator

Thanks! Without checking, does FMI1 handling have a similar issue?

@davidhjp01
Copy link
Contributor Author

I think fmi1_slave may also have the same issue. I just added initialisation there too to make sure the callers can check if the stepFinished is initialised.

@markaren markaren merged commit e7a2115 into master Jan 26, 2022
@markaren markaren deleted the bugfix-callbackfunc branch January 26, 2022 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants