Skip to content
Snippets Groups Projects
Forked from atlas / athena
Source project has a limited visibility.
  • scott snyder's avatar
    2dc2f13e
    PyUtils: Fix length inconsistency in SetSize call. · 2dc2f13e
    scott snyder authored and Attila Krasznahorkay's avatar Attila Krasznahorkay committed
    The pythonization of TFile::root was calling the SetSize method
    on a PyROOT buffer object.  The argument that SetSize takes is the
    number of elements in the buffer, where the size of each element
    depends on how the buffer was created.  Here, however, we were
    passing to SetSize a number of bytes.
    
    The buffer elements we were seeing were void*, which have size 8.
    So the buffer size was getting misset by a factor of 8.
    This was leading to a crash in the input file peeker.
    
    This crash was however only observed in the muRunData test of TrigUpgradeTest,
    and only when it was run with --stdcmalloc and MALLOC_CHECK_=3.
    It's a bit a mystery why this apparently long-standing bug hasn't 
    caused problems before.
    
    
    
    Former-commit-id: 5f553898f3b4118e8ce47eb78932349b750e2054
    2dc2f13e
    History
    PyUtils: Fix length inconsistency in SetSize call.
    scott snyder authored and Attila Krasznahorkay's avatar Attila Krasznahorkay committed
    The pythonization of TFile::root was calling the SetSize method
    on a PyROOT buffer object.  The argument that SetSize takes is the
    number of elements in the buffer, where the size of each element
    depends on how the buffer was created.  Here, however, we were
    passing to SetSize a number of bytes.
    
    The buffer elements we were seeing were void*, which have size 8.
    So the buffer size was getting misset by a factor of 8.
    This was leading to a crash in the input file peeker.
    
    This crash was however only observed in the muRunData test of TrigUpgradeTest,
    and only when it was run with --stdcmalloc and MALLOC_CHECK_=3.
    It's a bit a mystery why this apparently long-standing bug hasn't 
    caused problems before.
    
    
    
    Former-commit-id: 5f553898f3b4118e8ce47eb78932349b750e2054
Code owners
Assign users and groups as approvers for specific file changes. Learn more.