Skip to content
Snippets Groups Projects
  • Alessandro Di Federico's avatar
    9db62b28
    Handle `.bss`-only data segment · 9db62b28
    Alessandro Di Federico authored
    This commit fixes an assertion triggered by the fact that a segment
    includes exclusively zero-initialized data (i.e., size on file is 0,
    memory size is not). In this case LLVM detects the fact that the global
    variable associated to the segment is composed exclusively composed by
    0s and uses a `ConstantAggregateZero` as an initializer instead of a
    `ConstantDataArray`.
    
    Currently the solution is ignore that data, however, in the future it
    might be beneficial to be able to read data from `.bss`, even if we just
    have zeros there.
    
    Thanks to Thorbjoern Schulz for reporting this bug.
    9db62b28
    History
    Handle `.bss`-only data segment
    Alessandro Di Federico authored
    This commit fixes an assertion triggered by the fact that a segment
    includes exclusively zero-initialized data (i.e., size on file is 0,
    memory size is not). In this case LLVM detects the fact that the global
    variable associated to the segment is composed exclusively composed by
    0s and uses a `ConstantAggregateZero` as an initializer instead of a
    `ConstantDataArray`.
    
    Currently the solution is ignore that data, however, in the future it
    might be beneficial to be able to read data from `.bss`, even if we just
    have zeros there.
    
    Thanks to Thorbjoern Schulz for reporting this bug.