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

Fix for array bounds issue for hydraulic conductivity in var_derive.f90. #2

Conversation

seantrim
Copy link

@seantrim seantrim commented Aug 1, 2023

Hi @ashleymedin - This PR fixes an array going out of bounds in var_derive.f90. Specifically, mLayerSatHydCondMP was going out of bounds for iLayer=nSnow around line 347. In this update, a surrounding if statement has been updated to resolve the issue.

With this update, BE_Debug now runs the laugh tests without detecting any segmentation faults or array bounds violations. Stack memory is no longer being corrupted by invalid array element access.

Make sure all the relevant boxes are checked (and only check the box if you actually completed the step):

  • closes #xxx (identify the issue associated with this PR)
  • tests passed
  • new tests added
  • science test figures
  • checked that the new code conforms to the SUMMA coding conventions
  • ReleaseNotes entry

@ashleymedin ashleymedin merged commit ce8fd1f into ashleymedin:develop Aug 2, 2023
@ashleymedin
Copy link
Owner

This is good; this change would apply to the summa CH-earth develop branch too (https://github.com/CH-Earth/summa/tree/develop) -- so it's been around a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants