[Bug go/67101] New: mprof.goc:408:5: error:=?UTF-8?Q?=20calling=20=E2=80=98=5F=5Fbuiltin=5Fframe=5Faddress=E2=80=99=20with=20a=20nonzero=20argument=20is=20unsafe=20?=[-Werror=frame-address]

gary at intrepid dot com gcc-bugzilla@gcc.gnu.org
Mon Aug 3 14:28:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67101

            Bug ID: 67101
           Summary: mprof.goc:408:5: error: calling
                    ‘__builtin_frame_address’ with a nonzero argument is
                    unsafe [-Werror=frame-address]
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: gary at intrepid dot com
                CC: cmang at google dot com
  Target Milestone: ---

For a full bootstrap build, we also build Go and Fortran.  In today's merge
with trunk, the bootstrap failed, due to this error.

/eng/upc/dev/gary/gupc-merge/src/gupc/libgo/runtime/mprof.goc: In function
‘runtime_Stack’:
/eng/upc/dev/gary/gupc-merge/src/gupc/libgo/runtime/mprof.goc:408:5: error:
calling ‘__builtin_frame_address’ with a nonzero argument is unsafe
[-Werror=frame-address]
  sp = runtime_getcallersp(&b);
     ^
cc1: all warnings being treated as errors
make[4]: *** [mprof.lo] Error 1
make[4]: Leaving directory
`/eng/upc/dev/gary/gupc-merge/bld/packed-opt/x86_64-pc-linux-gnu/libgo'

This is likely triggered by the addition of -Wframe-address.

2015-08-02  Martin Sebor  <msebor@redhat.com>

        * c-family/c.opt (-Wframe-address): New warning option.
        * doc/invoke.texi (Wframe-address): Document it.
        * doc/extend.texi (__builtin_frame_address, __builtin_return_address):
        Clarify possible effects of calling the functions with non-zero
        arguments and mention -Wframe-address.
        * builtins.c (expand_builtin_frame_address): Handle -Wframe-address.


More information about the Gcc-bugs mailing list