[Bug fortran/67496] trans-array.c sanitizer runtime error: load of value 124, which is not a valid value for type 'bool'

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Aug 17 13:36:00 GMT 2016


Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
             Status|WAITING                     |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 39466
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39466&action=edit

Untested fix.  u.cl is obviously valid only for type == BT_CHARACTER, for
e.g. BT_DERIVED in the testcase it is u.derived instead.  So, trying to
unconditionally dereference it is invalid.  Not to mention if the type happens
to be BT_HOLLERITH, then it could have non-zero u.pad, so u.cl could be
non-NULL, yet it wouldn't be even a valid pointer.

More information about the Gcc-bugs mailing list