public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/61875] New: ATRIBUTE_NONNULL macro error
@ 2014-07-22  8:34 parkch98 at gmail dot com
  2014-07-22  8:58 ` [Bug sanitizer/61875] " y.gribov at samsung dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: parkch98 at gmail dot com @ 2014-07-22  8:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61875
           Summary: ATRIBUTE_NONNULL macro error
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: parkch98 at gmail dot com
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org

When I tried to build below flags, I found a error to build gcc.

CFLAGS='-O2 -g2 -feliminate-unused-debug-types -pipe -fexceptions
--param=ssp-buffer-size=32 -Wformat -Wformat-security -fmessage-length=0
-march=corei7 -msse4.2 -mtune=corei7-avx -mfpmath=sse
-fasynchronous-unwind-tables -fno-omit-frame-pointer -fipa-cp-clone
-U_FORTIFY_SOURCE' \
CXXFLAGS='-O2 -g2 -feliminate-unused-debug-types -pipe -fexceptions
--param=ssp-buffer-size=32 -Wformat -Wformat-security -fmessage-length=0
-march=corei7 -msse4.2 -mtune=corei7-avx -mfpmath=sse
-fasynchronous-unwind-tables -fno-omit-frame-pointer -fipa-cp-clone
-U_FORTIFY_SOURCE' \
XCFLAGS='-O2 -g2 -feliminate-unused-debug-types -pipe -fexceptions
--param=ssp-buffer-size=32 -Wformat -Wformat-security -fmessage-length=0
-march=corei7 -msse4.2 -mtune=corei7-avx -mfpmath=sse
-fasynchronous-unwind-tables -fno-omit-frame-pointer -fipa-cp-clone
-U_FORTIFY_SOURCE' \
TCFLAGS='-O2 -g2 -feliminate-unused-debug-types -pipe -fexceptions
--param=ssp-buffer-size=32 -Wformat -Wformat-security -fmessage-length=0
-march=corei7 -msse4.2 -mtune=corei7-avx -mfpmath=sse
-fasynchronous-unwind-tables -fno-omit-frame-pointer -fipa-cp-clone
-U_FORTIFY_SOURCE' \
GCJFLAGS='-O2 -g2 -feliminate-unused-debug-types -pipe -fexceptions
--param=ssp-buffer-size=32 -Wformat -Wformat-security -fmessage-length=0
-march=corei7 -msse4.2 -mtune=corei7-avx -mfpmath=sse
-fasynchronous-unwind-tables -fno-omit-frame-pointer -fipa-cp-clone
-U_FORTIFY_SOURCE ' \
../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man
--libdir=/usr/lib64 --libexecdir=/usr/lib64 --disable-bootstrap
--enable-languages=c,c++,objc,fortran,obj-c++,go --enable-checking=release
--with-gxx-include-dir=/usr/include/c++/4.9 --enable-ssp --disable-libssp
--disable-libvtv --disable-plugin --with-bugurl=http://bugs.tizen.org/
--with-pkgversion=Tizen --disable-libgcj --with-slibdir=/lib64
--with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new
--disable-libstdcxx-pch --enable-version-specific-runtime-libs
--enable-linker-build-id --enable-linux-futex --program-suffix=-4.9
--without-system-libunwind --with-arch-32=i586 --with-tune=generic
--disable-multilib --build=x86_64-tizen-linux --host=x86_64-tizen-linux

make STAGE1_CFLAGS=-g 'BOOT_CFLAGS=-O2 -g2 -feliminate-unused-debug-types -pipe
-fexceptions --param=ssp-buffer-size=32 -Wformat -Wformat-security
-fmessage-length=0 -march=corei7 -msse4.2 -mtune=corei7-avx -mfpmath=sse
-fasynchronous-unwind-tables -fno-omit-frame-pointer -fipa-cp-clone
-U_FORTIFY_SOURCE' -j8 -l16

=================================================================
The error is :
libtool: compile:  /opt/opensource/gcc/build/./gcc/xgcc -shared-libgcc
-B/opt/opensource/gcc/build/./gcc -nostdinc++
-L/opt/opensource/gcc/build/x86_64-tizen-linux/libstdc++-v3/src
-L/opt/opensource/gcc/build/x86_64-tizen-linux/libstdc++-v3/src/.libs
-L/opt/opensource/gcc/build/x86_64-tizen-linux/libstdc++-v3/libsupc++/.libs
-B/usr/x86_64-tizen-linux/bin/ -B/usr/x86_64-tizen-linux/lib/ -isystem
/usr/x86_64-tizen-linux/include -isystem /usr/x86_64-tizen-linux/sys-include
-D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -I. -I../../../../libsanitizer/sanitizer_common -I.. -I
../../../../libsanitizer/include -isystem
../../../../libsanitizer/include/system -Wall -W -Wno-unused-parameter
-Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions
-fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden
-Wno-variadic-macros -I../../libstdc++-v3/include
-I../../libstdc++-v3/include/x86_64-tizen-linux
-I../../../../libsanitizer/../libstdc++-v3/libsupc++ -DSANITIZER_LIBBACKTRACE
-DSANITIZER_CP_DEMANGLE -I ../../../../libsanitizer/../libbacktrace -I
../libbacktrace -I ../../../../libsanitizer/../include -include
../../../../libsanitizer/libbacktrace/backtrace-rename.h -g -O2 -g2
-feliminate-unused-debug-types -pipe -fexceptions --param=ssp-buffer-size=32
-Wformat -Wformat-security -fmessage-length=0 -march=corei7 -msse4.2
-mtune=corei7-avx -mfpmath=sse -fasynchronous-unwind-tables
-fno-omit-frame-pointer -fipa-cp-clone -U_FORTIFY_SOURCE -D_GNU_SOURCE -MT
sanitizer_symbolizer_libbacktrace.lo -MD -MP -MF
.deps/sanitizer_symbolizer_libbacktrace.Tpo -c
../../../../libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc 
-fPIC -DPIC -o .libs/sanitizer_symbolizer_libbacktrace.o
In file included from ../../../../libsanitizer/../include/libiberty.h:43:0,
                 from ../../../../libsanitizer/../include/demangle.h:33,
                 from
../../../../libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc:25:
../../../../libsanitizer/../include/ansidecl.h:171:64: error: declaration of
‘int asprintf(char**, const char*, ...)’ has a different exception specifier
 #  define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
                                                                ^
../../../../libsanitizer/../include/ansidecl.h:200:80: note: in expansion of
macro ‘ATTRIBUTE_NONNULL’
 #define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
ATTRIBUTE_NONNULL(m)
                                                                               
^
../../../../libsanitizer/../include/ansidecl.h:202:28: note: in expansion of
macro ‘ATTRIBUTE_PRINTF’
 #define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
                            ^
../../../../libsanitizer/../include/libiberty.h:619:50: note: in expansion of
macro ‘ATTRIBUTE_PRINTF_2’
 extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
                                                  ^
In file included from
../../../../libsanitizer/../libbacktrace/backtrace.h:37:0,
                 from
../../../../libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc:22:
/usr/include/stdio.h:405:12: error: from previous declaration ‘int
asprintf(char**, const char*, ...) throw ()’
 extern int asprintf (char **__restrict __ptr,
            ^
In file included from ../../../../libsanitizer/../include/libiberty.h:43:0,
                 from ../../../../libsanitizer/../include/demangle.h:33,
                 from
../../../../libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc:25:
../../../../libsanitizer/../include/ansidecl.h:171:64: error: declaration of
‘int vasprintf(char**, const char*, __va_list_tag*)’ has a different exception
specifier
 #  define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
                                                                ^
../../../../libsanitizer/../include/ansidecl.h:200:80: note: in expansion of
macro ‘ATTRIBUTE_NONNULL’
 #define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
ATTRIBUTE_NONNULL(m)
                                                                               
^
../../../../libsanitizer/../include/libiberty.h:626:55: note: in expansion of
macro ‘ATTRIBUTE_PRINTF’
 extern int vasprintf (char **, const char *, va_list) ATTRIBUTE_PRINTF(2,0);
                                                       ^
In file included from
../../../../libsanitizer/../libbacktrace/backtrace.h:37:0,
                 from
../../../../libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc:22:
/usr/include/stdio.h:399:12: error: from previous declaration ‘int
vasprintf(char**, const char*, __va_list_tag*) throw ()’
 extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
            ^
make[4]: *** [sanitizer_symbolizer_libbacktrace.lo] Error 1
make[4]: Leaving directory
`/opt/opensource/gcc/build/x86_64-tizen-linux/libsanitizer/sanitizer_common'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/opt/opensource/gcc/build/x86_64-tizen-linux/libsanitizer'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/opt/opensource/gcc/build/x86_64-tizen-linux/libsanitizer'
make[1]: *** [all-target-libsanitizer] Error 2
make[1]: Leaving directory `/opt/opensource/gcc/build'
make: *** [all] Error 2
make: INTERNAL: Exiting with 10 jobserver tokens available; should be 8!

=========================================
I think "-fipa-cp-clone" option cause the problem.
>From gcc-bugs-return-456902-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jul 22 08:49:53 2014
Return-Path: <gcc-bugs-return-456902-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4758 invoked by alias); 22 Jul 2014 08:49:52 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 4595 invoked by uid 48); 22 Jul 2014 08:49:36 -0000
From: "izamyatin at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/61734] [4.10 Regression] Regression in ABS_EXPR recognition
Date: Tue, 22 Jul 2014 08:49:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.10.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: izamyatin at gmail dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ebotcazou at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.10.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-61734-4-aDby2tMCdc@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61734-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61734-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-07/txt/msg01493.txt.bz2
Content-length: 433

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida734

Igor Zamyatin <izamyatin at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |izamyatin at gmail dot com

--- Comment #6 from Igor Zamyatin <izamyatin at gmail dot com> ---
Eric, dou you have any plans regarding this issue?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug sanitizer/61875] ATRIBUTE_NONNULL macro error
  2014-07-22  8:34 [Bug sanitizer/61875] New: ATRIBUTE_NONNULL macro error parkch98 at gmail dot com
@ 2014-07-22  8:58 ` y.gribov at samsung dot com
  2014-07-22 10:05 ` t.udalova at samsung dot com
  2014-08-19 11:45 ` tetra2005 at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: y.gribov at samsung dot com @ 2014-07-22  8:58 UTC (permalink / raw)
  To: gcc-bugs

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

Yury Gribov <y.gribov at samsung dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |y.gribov at samsung dot com

--- Comment #1 from Yury Gribov <y.gribov at samsung dot com> ---
I think the error may be caused by compiling gcc with -fexceptions. Here is a
short repro:
$ cat tmp.cpp
int f () throw ();
int f ();
$ g++ -fexceptions tmp.cpp -c
tmp.cpp:2:8: error: declaration of ‘int f()’ has a different exception
specifier
tmp.cpp:1:5: error: from previous declaration ‘int f() throw ()’

The error is well known, here's link to Perl bug with proposed solution:
https://rt.perl.org/Public/Bug/Display.html?id=121151
>From gcc-bugs-return-456904-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jul 22 09:34:23 2014
Return-Path: <gcc-bugs-return-456904-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24751 invoked by alias); 22 Jul 2014 09:34:22 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 24582 invoked by uid 48); 22 Jul 2014 09:34:12 -0000
From: "m.zakirov at samsung dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/61875] ATRIBUTE_NONNULL macro error
Date: Tue, 22 Jul 2014 09:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 4.9.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: m.zakirov at samsung dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-61875-4-vcPDO5TbXb@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61875-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61875-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-07/txt/msg01495.txt.bz2
Content-length: 599

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida875

Marat Zakirov <m.zakirov at samsung dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |m.zakirov at samsung dot com

--- Comment #2 from Marat Zakirov <m.zakirov at samsung dot com> ---
We had the same problem in Tizen. But my Q to asan and gcc maintainers is
wider.
Do we consider that asan in gcc should build with option -fexeptions?
Or should it ignore this option? Or fail as it is for know?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug sanitizer/61875] ATRIBUTE_NONNULL macro error
  2014-07-22  8:34 [Bug sanitizer/61875] New: ATRIBUTE_NONNULL macro error parkch98 at gmail dot com
  2014-07-22  8:58 ` [Bug sanitizer/61875] " y.gribov at samsung dot com
@ 2014-07-22 10:05 ` t.udalova at samsung dot com
  2014-08-19 11:45 ` tetra2005 at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: t.udalova at samsung dot com @ 2014-07-22 10:05 UTC (permalink / raw)
  To: gcc-bugs

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

Tatiana Udalova <t.udalova at samsung dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |t.udalova at samsung dot com

--- Comment #3 from Tatiana Udalova <t.udalova at samsung dot com> ---
You can fix problem in Tizen via deletting -fexceptions flag from the default
flags for gcc, cross-gcc and cross-gcc-accel packages:
OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e 's/-fexceptions / /'`


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug sanitizer/61875] ATRIBUTE_NONNULL macro error
  2014-07-22  8:34 [Bug sanitizer/61875] New: ATRIBUTE_NONNULL macro error parkch98 at gmail dot com
  2014-07-22  8:58 ` [Bug sanitizer/61875] " y.gribov at samsung dot com
  2014-07-22 10:05 ` t.udalova at samsung dot com
@ 2014-08-19 11:45 ` tetra2005 at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: tetra2005 at gmail dot com @ 2014-08-19 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

Yuri Gribov <tetra2005 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tetra2005 at gmail dot com

--- Comment #5 from Yuri Gribov <tetra2005 at gmail dot com> ---
Libsanitizer does not support building with -fexceptions. Patch was proposed in
https://gcc.gnu.org/ml/gcc-patches/2014-08/msg01764.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-19 11:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-22  8:34 [Bug sanitizer/61875] New: ATRIBUTE_NONNULL macro error parkch98 at gmail dot com
2014-07-22  8:58 ` [Bug sanitizer/61875] " y.gribov at samsung dot com
2014-07-22 10:05 ` t.udalova at samsung dot com
2014-08-19 11:45 ` tetra2005 at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).