Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • A ADIOS2
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 97
    • Issues 97
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Podhorszki, Norbert
  • ADIOS2
  • Issues
  • #1317

Closed
Open
Created Mar 22, 2019 by Podhorszki, Norbert@pnbOwner

PutAttributeLengthInData

Created by: germasch

from BP3Serializer.tcc:

template <class T>
void BP3Serializer::PutAttributeLengthInData(
    const core::Attribute<T> &attribute, Stats<T> &stats,
    const size_t attributeLengthPosition) noexcept
{
    auto &buffer = m_Data.m_Buffer;
    auto &position = m_Data.m_Position;
    auto &absolutePosition = m_Data.m_AbsolutePosition;

    // back to attribute length
    size_t backPosition = attributeLengthPosition;
    helper::CopyToBuffer(buffer, backPosition, &attributeLengthPosition);

    absolutePosition += position - attributeLengthPosition;
}

The code that serializes attributes leaves a gap for the length (as I understand the comment). This then later gets filled in by the code above. However, what that the code above is to write the position of attribute length in the file into that spot. That seems questionable to me. As does the fact that it looks to me that a 4 byte gap had been reserved before, but now size_t, ie 8 bytes on 64-bit systems are written.

I haven't seen any trouble related to it, though.

Assignee
Assign to
Time tracking