Skip to content

Commit

Permalink
[BugFix] BeamDyn nodal outputs occasionally segfaulted
Browse files Browse the repository at this point in the history
The cause was an index that never got set.  So this could result in
attempting to retrieve a value from the output mapping array using an
out of bounds index (sometimes a very large negative number).  This
never appeared in gcc compiled versions, but occasionally would appear
in certain intel compiled versions (others initialized the value
apparently).
  • Loading branch information
andrew-platt committed Feb 10, 2022
1 parent 42a5a81 commit d3b48f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/beamdyn/src/BeamDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,7 @@ subroutine SetParameters(InitInp, InputFileData, p, ErrStat, ErrMsg)
if (ErrStat >= AbortErrLev) return

p%NdIndx(1) = 1
p%NdIndxInverse(1) = 1
p%OutNd2NdElem(:,1) = 1 ! note this is an array
indx = 2
DO i=1,p%elem_total
Expand Down Expand Up @@ -1119,6 +1120,7 @@ subroutine SetParameters(InitInp, InputFileData, p, ErrStat, ErrMsg)
if (ErrStat >= AbortErrLev) return

p%NdIndx(1) = 1
p%NdIndxInverse(1) = 1
p%OutNd2NdElem(:,1) = 1 ! note this is an array
indx = 2
DO i=1,p%elem_total
Expand Down

0 comments on commit d3b48f9

Please sign in to comment.