View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000360OpenFOAM[All Projects] Bugpublic2011-12-18 22:462011-12-20 10:51
Reportercarljohnson 
Assigned Toandy 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformlinuxOSUbuntu LinuxOS Version11.10
Product Version2.0.x 
Target VersionFixed in Version2.1.x 
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.
Attached Files

- Relationships

-  Notes
(0000853)
andy (manager)
2011-12-20 10:51

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 carljohnson New Issue
2011-12-20 10:51 andy Note Added: 0000853
2011-12-20 10:51 andy Status new => resolved
2011-12-20 10:51 andy Fixed in Version => 2.1.x
2011-12-20 10:51 andy Resolution open => fixed
2011-12-20 10:51 andy Assigned To => andy