View Issue Details

IDProjectCategoryView StatusLast Update
0000360OpenFOAMBugpublic2011-12-20 10:51
Reporteruser310Assigned Touser2 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformlinuxOSUbuntu LinuxOS Version11.10
Summary0000360: incompressible RAS wall function "nu" at patch access error
DescriptionAccessing boundary nu values references deallocated memory in 12 locations throughout the incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions subfolders.

The line of concern is:
const scalarField& nuw = rasModel.nu()().boundaryField()[patchI];

I believe this line should be replaced with the following lines to avoid accessing the boundary field of the temporary volScalarField after its memory has been freed:
const tmp<volScalarField> tnu = rasModel.nu();
const volScalarField& nu = tnu();
const scalarField& nuw = nu.boundaryField()[patchI];

I apologise if this error has already been fixed or raised or if my understanding of the error is flawed.
Steps To ReproduceUse command "grep -r "rasModel[.]nu()()[.]boundaryField()\[patchI\].*" *" to find the erroneous lines.
TagsNo tags attached.

Activities

user2

2011-12-20 10:51

  ~0000853

Thanks for the report

version 2.1.x: fixed by commit 825bfdd80c91f563c2fff87e08a715287aafbf8e
version 2.0.x: fixed by commit 6bd04ef73caac34f3894c3f2b91fa354fdf32886

Issue History

Date Modified Username Field Change
2011-12-18 22:46 user310 New Issue
2011-12-20 10:51 user2 Note Added: 0000853
2011-12-20 10:51 user2 Status new => resolved
2011-12-20 10:51 user2 Fixed in Version => 2.1.x
2011-12-20 10:51 user2 Resolution open => fixed
2011-12-20 10:51 user2 Assigned To => user2