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

            Bug ID: 85114
           Summary: -fstack-check causes internal compiler error
           Product: gcc
           Version: 6.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tk at giga dot or.at
  Target Milestone: ---

When compiling thunderbird 52.7.0 (currently latest version) with gcc 6.4.0 as
distributed with NetBSD, on NetBSD-8.99.14/amd64, with -fstack-check, I see the
following error:

In file included from
/scratch/mail/thunderbird/work/build/layout/generic/Unified_cpp_layout_generic1.cpp:11:0:
/scratch/mail/thunderbird/work/thunderbird-52.6.0/mozilla/layout/generic/nsBlockFrame.cpp:
In member function 'virtual nscoord
nsBlockFrame::GetMinISize(nsRenderingContext*)':
/scratch/mail/thunderbird/work/thunderbird-52.6.0/mozilla/layout/generic/nsBlockFrame.cpp:704:1:
internal compiler error: in refs_may_alias_p_1, at tree-ssa-alias.c:1429
 nsBlockFrame::GetMinISize(nsRenderingContext *aRenderingContext)
 ^~~~~~~~~~~~
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://www.NetBSD.org/support/send-pr.html> for instructions.
/scratch/mail/thunderbird/work/thunderbird-52.6.0/mozilla/config/rules.mk:951:
recipe for target 'Unified_cpp_layout_generic1.o' failed


When I removed the -fstack-check, the internal compiler error is gone and I
see:

In file included from
/scratch/mail/thunderbird/work/build/layout/generic/Unified_cpp_layout_generic1.cpp:101:0:
/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/generic/nsFrame.cpp:
In member function ‘nscoord nsIFrame::ComputeISizeValue(nsRenderingContext*,
nscoord, nscoord, nscoord, const nsStyleCoord&, nsIFrame::ComputeSizeFlags)’:
/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/generic/nsFrame.cpp:5434:11:
warning: ‘result’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
   nscoord result;
           ^~~~~~
In file included from
/scratch/mail/thunderbird/work/build/layout/generic/Unified_cpp_layout_generic1.cpp:101:0:
/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/generic/nsFrame.cpp:
In member function ‘mozilla::LogicalSize
nsFrame::ComputeSizeWithIntrinsicDimensions(nsRenderingContext*,
mozilla::WritingMode, const mozilla::IntrinsicSize&, nsSize, const
mozilla::LogicalSize&, const mozilla::LogicalSize&, const
mozilla::LogicalSize&, const mozilla::LogicalSize&,
nsIFrame::ComputeSizeFlags)’:
/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/generic/nsFrame.cpp:5006:38:
warning: ‘bSize’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
   nscoord iSize, minISize, maxISize, bSize, minBSize, maxBSize;
                                      ^~~~~
/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/generic/nsFrame.cpp:5006:11:
warning: ‘iSize’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
   nscoord iSize, minISize, maxISize, bSize, minBSize, maxBSize;
           ^~~~~
In file included from
/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/generic/nsBackdropFrame.cpp:11:0,
                 from
/scratch/mail/thunderbird/work/build/layout/generic/Unified_cpp_layout_generic1.cpp:2:
/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/base/nsDisplayList.h:
In member function ‘void
nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder*, const
nsRect&, nsDisplayList*)’:
/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/base/nsDisplayList.h:1115:33:
warning: ‘*((void*)(&
autoPreserves3DContext)+8).nsDisplayListBuilder::AutoPreserves3DContext::mBuilder’
may be used uninitialized in this function [-Wmaybe-uninitialized]
       mBuilder->mPreserves3DCtx = mSavedCtx;
       ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from
/scratch/mail/thunderbird/work/build/layout/generic/Unified_cpp_layout_generic1.cpp:101:0:
/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/generic/nsFrame.cpp:2136:55:
note: ‘*((void*)(&
autoPreserves3DContext)+8).nsDisplayListBuilder::AutoPreserves3DContext::mBuilder’
was declared here
   Maybe<nsDisplayListBuilder::AutoPreserves3DContext> autoPreserves3DContext;
                                                       ^~~~~~~~~~~~~~~~~~~~~~
In file included from
/scratch/mail/thunderbird/work/build/layout/generic/Unified_cpp_layout_generic1.cpp:74:0:
/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/generic/nsFlexContainerFrame.cpp:
In member function ‘void nsFlexContainerFrame::DoFlexLayout(nsPresContext*,
nsIFrame::ReflowOutput&, const ReflowInput&, nsReflowStatus&, nscoord, nscoord,
nsTArray<nsFlexContainerFrame::StrutInfo>&, const
nsFlexContainerFrame::FlexboxAxisTracker&)’:
/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/generic/nsFlexContainerFrame.cpp:4485:29:
warning: ‘flexContainerAscent’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
       if (item == firstItem &&
           ~~~~~~~~~~~~~~~~~~^~
           flexContainerAscent == nscoord_MIN) {
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     


Here's the command line:

c++ -save-temps -std=gnu++11 -o Unified_cpp_layout_generic1.o -c
-I/scratch/mail/thunderbird/work/build/dist/stl_wrappers
-I/scratch/mail/thunderbird/work/build/dist/system_wrappers -include
/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/config/gcc_hidden.h
-DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_NETBSD=1 -DOS_BSD=1
-DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API
-DIMPL_LIBXUL
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/generic
-I/scratch/mail/thunderbird/work/build/layout/generic
-I/scratch/mail/thunderbird/work/build/ipc/ipdl/_ipdlheaders
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/ipc/chromium/src
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/ipc/glue
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/dom/plugins/base
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/base
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/forms
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/style
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/svg
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/tables
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/layout/xul
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/dom/base
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/dom/html
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/dom/xul
-I/scratch/mail/thunderbird/work/build/dist/include  -I/usr/pkg/include/nspr
-I/usr/pkg/include/nss -I/usr/pkg/include/nspr    -I/usr/pkg/include/pixman-1  
-fPIC -DPIC  -DMOZILLA_CLIENT -include
/scratch/mail/thunderbird/work/build/mozilla-config.h -MD -MP -MF
.deps/Unified_cpp_layout_generic1.o.pp -g -I/usr/include -I/usr/pkg/include
-I/usr/pkg/include/nspr -I/usr/pkg/include/nss/nss -I/usr/pkg/include/libdrm
-I/usr/pkg/include/freetype2 -I/usr/pkg/include/glib/glib-2.0
-I/usr/pkg/include/glib/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include
-I/usr/pkg/include/ffmpeg3 -Wall -Wc++11-compat -Wempty-body
-Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare
-Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof
-Wc++14-compat -Wno-error=maybe-uninitialized
-Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-lifetime-dse
-O2 -g -D_FORTIFY_SOURCE=2 -fstack-check -I/usr/include -I/usr/pkg/include
-I/usr/pkg/include/nspr -I/usr/pkg/include/nss/nss -I/usr/pkg/include/libdrm
-I/usr/pkg/include/freetype2 -I/usr/pkg/include/glib/glib-2.0
-I/usr/pkg/include/glib/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include
-I/usr/pkg/include/ffmpeg3 -fno-exceptions -fno-strict-aliasing -Dunix
-fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -I/usr/pkg/include  -g
-O2 -fomit-frame-pointer  -I/usr/pkg/include/cairo -I/usr/pkg/include/pixman-1
-I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/uuid
-I/usr/pkg/include/libpng16 -D_REENTRANT -I/usr/pkg/include/cairo
-I/usr/pkg/include/pixman-1 -I/usr/pkg/include -I/usr/pkg/include/freetype2
-I/usr/pkg/include/uuid -I/usr/pkg/include/libpng16 -D_REENTRANT
-I/scratch/mail/thunderbird/work/thunderbird-52.7.0/mozilla/widget/gtk/compat-gtk3
-I/usr/pkg/include/gtk-3.0 -I/usr/pkg/include/pango-1.0
-I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include
-I/usr/pkg/include -I/usr/pkg/include/cairo -I/usr/pkg/include/pixman-1
-I/usr/pkg/include/freetype2 -I/usr/pkg/include/uuid
-I/usr/pkg/include/libpng16 -I/usr/pkg/include/harfbuzz
-I/usr/pkg/include/gdk-pixbuf-2.0 -D_REENTRANT
-I/usr/pkg/include/glib/gio-unix-2.0/ -D_REENTRANT -I/usr/pkg/include/atk-1.0
-I/usr/pkg/include/at-spi2-atk/2.0 -I/usr/pkg/include/at-spi-2.0
-I/usr/pkg/include/dbus-1.0 -I/usr/pkg/lib/dbus-1.0/include
-I/usr/pkg/include/gtk-3.0/unix-print -D_REENTRANT -D_REENTRANT -D_REENTRANT
-D_REENTRANT -pthread -Wno-error=shadow 
/scratch/mail/thunderbird/work/build/layout/generic/Unified_cpp_layout_generic1.cpp

The .ii file is 10MB. gzipped it is still 1,5MB which is larger than the
attachment limit. So I've uploaded it here:

http://danbala.tuwien.ac.at/~wiz/tmp/Unified_cpp_layout_generic1.ii.gz

I've also reported this at NetBSD's GNATS at
https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=53139

Reply via email to