Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 379
    • Issues 379
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #676

Closed
Open
Created Dec 20, 2017 by Mattijs Janssens@MattijsMaintainer

label64 with FULLDEBUG gives problems

When doing WM_LABEL_SIZE=64 and WM_COMPILE_OPTION=Debug there is a problem in reading even the initial controlDict. This traces back to UIPstream::readStringFromBuffer where it tries to read zero bytes from the current pointer (&externalBuf_[externalBufPosition_]). If that pointer points to one-beyond the end of the buffer the call will fail.

Workaround: do not use pointer in case of zero bytes. Note that it only affects the fulldebug checking; the library routine handles it ok.

E.g.

inline Foam::Istream& Foam::UIPstream::readStringFromBuffer(std::string& str) { // Use std::string::assign() to copy content, including '\0'. // Stripping (when desired) is the responsibility of the sending side.

size_t len;
readFromBuffer(len);

if (len == 0)
{
    str.assign(nullptr, len);
}
else
{
    str.assign(&externalBuf_[externalBufPosition_], len);
}
Assignee
Assign to
Time tracking