Skip to content
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

InflowWind: Return if fatal error occurs in FFWind_Base::GetInterpValues #769

Merged
merged 1 commit into from
Jun 7, 2021

Conversation

andrew-platt
Copy link
Collaborator

@andrew-platt andrew-platt commented Jun 3, 2021

This PR is ready to merge

Feature or improvement description

The GetInterpValues() routine in IfW_FFWind_Base.f90 checks the bounds of the full field wind data in the y direction and sets an error. However, the array was accessed immediately afterwards potentially with an invalid index to the array and may trigger a segmentation fault.

A check was added to ensure that no fatal errors occured in the GetInterpValues() call and return at that point before attempting to read from an invalid location outside the p%FFData array.

Related issue, if one exists
No known issues. This showed up in testing of the LidarSim module in development.

Impacted areas of the software
InflowWind full field wind interpolation only. And only if outside the bounds.

Test results, if applicable
No tests will be affected.

…alid index

- the GetInterpValues() routine in IfW_FFWind_Base.f90 checks the bounds of the FF in the y direction and sets an error.  However, we should exit at that point before attempting to read from an invalid location outside the p%FFData array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant