[Bug go/48553] New: fmt FAILs on 32-bit Solaris 2 with stack overflow

ro at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 11 13:09:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48553

           Summary: fmt FAILs on 32-bit Solaris 2 with stack overflow
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
        AssignedTo: ian@airs.com
        ReportedBy: ro@gcc.gnu.org
              Host: *-*-solaris2.*
            Target: *-*-solaris2.*
             Build: *-*-solaris2.*


While investigating libgo failures, I noticed that the fmt tests fails only
for 32-bit and if compiled without optimization.  The failure is like this:

=== RUN  fmt_test.TestScanInts
Segmentation Fault

With truss, I see

23987/2:            Incurred fault #6, FLTBOUNDS  %pc = 0x080676B8
23987/2:              siginfo: SIGSEGV SEGV_MAPERR addr=0xCDF10FFC
23987/2:            Received signal #11, SIGSEGV [caught]
23987/2:              siginfo: SIGSEGV SEGV_MAPERR addr=0xCDF10FFC

which is exactly the lower bound of the thread stack:

CDF00000      64K rwx--    [ anon ]
CDF11000    1016K rwx-R    [ stack tid=2 ]
CE010000      64K rw---    [ anon ]

This matches the very deep nesting seen in gdb (ca. 4000 frames).

The test passes with -m64 (default thread stack size of 2 MB instead of 1 MB
for 32-bit) and with -O2.

Perhaps the nesting should be reduced to accomodate platforms without split
stack support?



More information about the Gcc-bugs mailing list