[Bug ada/53686] New: gnatchop -r raises STORAGE_ERROR on all inputs

georggcc at googlemail dot com gcc-bugzilla@gcc.gnu.org
Fri Jun 15 15:42:00 GMT 2012


             Bug #: 53686
           Summary: gnatchop -r raises STORAGE_ERROR on all inputs
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: georggcc@googlemail.com

Given any unit, such as

package Unit is
    pragma Pure (Unit);
end Unit;

in file "unit.ada", gnatchop fails when run with -r (or -r -w):

$ PATH=${HOME}/mine/bin:/usr/bin:/bin gnatchop -r -v unit.ada
GNATCHOP 4.8.0 20120615 (experimental)
Copyright (C) 1998-2012, Free Software Foundation, Inc.
/home/bauhaus/mine/bin/gcc -c -x ada -gnats -gnatu unit.ada
splitting unit.ada into:

raised STORAGE_ERROR : stack overflow or erroneous memory access

${HOME}/mine has an installation of GCC Rev 188651.

An attempt at debugging hints at line 1605 in gnatchop.ada,

            Reference : String :=
                          "pragma Source_Reference (000000, """
                            & Nam.all & """);" & EOL.Str;

(gdb) ...
Program received signal SIGSEGV, Segmentation fault.
__memcpy_ssse3 () at ../sysdeps/x86_64/multiarch/memcpy-ssse3.S:1955
1955    ../sysdeps/x86_64/multiarch/memcpy-ssse3.S: No such file or directory.
(gdb) where
#0  __memcpy_ssse3 () at ../sysdeps/x86_64/multiarch/memcpy-ssse3.S:1955
#1  0x0000000000451cff in gnatchop.write_source_reference_pragma (info=...,
line=1, file=0x775740, eol=..., success=<optimized out>) at
#2  0x0000000000452efa in gnatchop.write_unit (source=..., num=num@entry=1,
ts_time=ts_time@entry=1339772574, write_bom=<optimized out>, <sourceL>=<error
reading variable: Unhandled dwarf expression opcode 0xfa>)
    at /home/bauhaus/src/gcc/trunk/gcc/ada/gnatchop.adb:1740
#3  0x0000000000456f94 in gnatchop.write_chopped_files (input=1) at
#4  gnatchop () at /home/bauhaus/src/gcc/trunk/gcc/ada/gnatchop.adb:1861

Linux newnews 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012
x86_64 x86_64 x86_64 GNU/Linux

$ uname -a
Linux newnews 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012
x86_64 x86_64 x86_64 GNU/Linux

$ PATH=${HOME}/mine/bin:$PATH gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/bauhaus/src/gcc/trunk/configure
--prefix=/home/bauhaus/mine --disable-nls --disable-libstdcxx-pch
--enable-languages=c,ada,c++,fortran LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
Thread model: posix
gcc version 4.8.0 20120615 (experimental) (GCC)

More information about the Gcc-bugs mailing list