IBM Support

LI75332: APPLICATION COREDUMPS WHILE ALLOCATING TEXT TO AN ARRAY

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • While attempting to allocate text to an array element, if
    certain conditions are present (noted in the testcase),
    running the application will result in a segmentation fault, or
    will not be filled with the right value.
    
    ===== Start of test.f90=====
    In:
    
    module m
      type menu
        character(len=:), allocatable :: texte
      end type menu
    
      type(menu), dimension(1) :: v
      !type(menu) :: obj
    
      integer choix
    
    contains
    
      subroutine init_menu
        !obj%texte = "obj value"
        v(1)%texte = "v1 value"
        PRINT*,v(1)
      end subroutine init_menu
    
    end module m
    !
    program p
      use m
    
      call init_menu
    
    end program p
    =========End of test.f90=======
    
    ===== COMPILE COMMAND:
    xlf90 test.f90
    
    ===== ACTUAL OUTPUT:
    Segmentation fault(coredump) or blank
    
    ===== EXPECTED OUTPUT:
    v1 value
    

Local fix

  • Modifying the test case to the following can be used as a
    workaround:
    
    module m
      type menu
        character(len=:), allocatable :: texte
      end type menu
    
      type(menu), dimension(1) :: v
      !type(menu) :: obj
    
      integer choix
    
    contains
    
      subroutine init_menu
        !allocate(obj%texte, source="Calcul valeurs propres d'une
    matrice
    complexe")
        allocate(v(1)%texte, source="Calcul valeurs propres d'une
    matrice
    complexe")
      end subroutine init_menu
    
    end module m
    !
    program p
      use m
    
      call init_menu
    
    end program p
    

Problem summary

  • Users who declare an array of derived type which
    contains allocatable component and the entity is used
    before explicitly allocated are affected by this issue.
    
    
    In auto-allocating the entity, the offset of
    the component is not calculated correctly.
    

Problem conclusion

  • The offset problem is now fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI75332

  • Reported component name

    XL FORTRAN SLES

  • Reported component ID

    5724S7400

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-03-11

  • Closed date

    2010-03-11

  • Last modified date

    2010-03-11

  • APAR is sysrouted FROM one or more of the following:

    IZ49926

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL FORTRAN SLES

  • Fixed component ID

    5724S7400

Applicable component levels

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSB259","label":"XL Fortran Advanced Edition for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"B.1","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
24 February 2022