public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/64984] [5 Regression] ICE in check_noexcept_t with ubsan
       [not found] <bug-64984-4@http.gcc.gnu.org/bugzilla/>
@ 2015-02-10 10:04 ` jakub at gcc dot gnu.org
  2015-02-10 12:28 ` larsbj at gullik dot net
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-10 10:04 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 34710
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34710&action=edit
gcc5-pr64984.patch

Untested fix.


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

* [Bug sanitizer/64984] [5 Regression] ICE in check_noexcept_t with ubsan
       [not found] <bug-64984-4@http.gcc.gnu.org/bugzilla/>
  2015-02-10 10:04 ` [Bug sanitizer/64984] [5 Regression] ICE in check_noexcept_t with ubsan jakub at gcc dot gnu.org
@ 2015-02-10 12:28 ` larsbj at gullik dot net
  2015-02-12 15:39 ` jakub at gcc dot gnu.org
  2015-02-12 15:40 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: larsbj at gullik dot net @ 2015-02-10 12:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Lars Gullik Bjønnes <larsbj at gullik dot net> ---
(In reply to Jakub Jelinek from comment #3)
> Created attachment 34710 [details]
> gcc5-pr64984.patch
> 
> Untested fix.

This seems to fix ICE, but I have at least one more that needs tracking down,
also related to -fsanitize=undefined, but not to -fsanitize=vptr.
(and a hang with -fsanitize=address and heap-use-after-free reporting.)

I'll create separate bugs for those.
>From gcc-bugs-return-476648-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Feb 10 12:56:53 2015
Return-Path: <gcc-bugs-return-476648-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29260 invoked by alias); 10 Feb 2015 12:56:53 -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 29199 invoked by uid 48); 10 Feb 2015 12:56:49 -0000
From: "larsbj at gullik dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/65000] New: ICE in in expand_builtin_eh_common, at except.c:2072
Date: Tue, 10 Feb 2015 12:56:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: larsbj at gullik dot net
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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc
Message-ID: <bug-65000-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-02/txt/msg00981.txt.bz2
Content-length: 2726

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

            Bug ID: 65000
           Summary: ICE in in expand_builtin_eh_common, at except.c:2072
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: larsbj at gullik dot net
                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

With this test program I get an ICE:

-------
#include <boost/format.hpp>

void setGateLog()
{
    boost::format fmt("%%");
    fmt % 1;
}
-------

g++ --version
g++ (GCC) 5.0.0 20150210 (experimental) (as of revision 220578)

g++ -O1 -fsanitize=undefined -fno-sanitize-recover -c test.cpp

In file included from /usr/include/boost/format.hpp:49:0,
                 from test.cpp:1:
/usr/include/boost/format/feed_args.hpp: In function ‘void
boost::io::detail::put(T, const boost::io::detail::format_item<Ch, Tr, Alloc>&,
typename boost::basic_format<Ch, Tr, Alloc>::string_type&, typename
boost::basic_format<Ch, Tr, Alloc>::internal_streambuf_t&,
boost::io::detail::locale_t*) [with Ch = char; Tr = std::char_traits<char>;
Alloc = std::allocator<char>; T = const int&; typename boost::basic_format<Ch,
Tr, Alloc>::string_type = std::__cxx11::basic_string<char>; typename
boost::basic_format<Ch, Tr, Alloc>::internal_streambuf_t =
boost::io::basic_altstringbuf<char, std::char_traits<char>,
std::allocator<char> >; boost::io::detail::locale_t = std::locale]’:
/usr/include/boost/format/feed_args.hpp:122:10: internal compiler error: in
expand_builtin_eh_common, at except.c:2072
     void put( T x, 
          ^
0x8266d1 expand_builtin_eh_common
        ../../gcc/gcc/except.c:2072
0x8282df expand_builtin_eh_copy_values(tree_node*)
        ../../gcc/gcc/except.c:2108
0x76978a expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
        ../../gcc/gcc/builtins.c:6521
0x84177b expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc/gcc/expr.c:10488
0x77f91c expand_expr
        ../../gcc/gcc/expr.h:254
0x77f91c expand_call_stmt
        ../../gcc/gcc/cfgexpand.c:2383
0x77f91c expand_gimple_stmt_1
        ../../gcc/gcc/cfgexpand.c:3327
0x77f91c expand_gimple_stmt
        ../../gcc/gcc/cfgexpand.c:3481
0x78374a expand_gimple_basic_block
        ../../gcc/gcc/cfgexpand.c:5470
0x7854c6 execute
        ../../gcc/gcc/cfgexpand.c:6088


Removing -fno-sanitize-recover or compiling without optimization
removes the ICE.

I can provide pre-processed source if wanted.
>From gcc-bugs-return-476649-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Feb 10 12:57:56 2015
Return-Path: <gcc-bugs-return-476649-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30307 invoked by alias); 10 Feb 2015 12:57:56 -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 30238 invoked by uid 48); 10 Feb 2015 12:57:52 -0000
From: "tschwinge at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/64748] OpenACC: "is not a variable" error with deviceptr()
Date: Tue, 10 Feb 2015 12:57:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: openacc, rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: tschwinge at gcc dot gnu.org
X-Bugzilla-Status: NEW
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: bug_status cf_reconfirmed_on cc everconfirmed
Message-ID: <bug-64748-4-nb4ZhjbFOR@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64748-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64748-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: 2015-02/txt/msg00982.txt.bz2
Content-length: 1527

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-10
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jnorris at gcc dot gnu.org,
                   |                            |tschwinge at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
This also needs to be fixed for C++.

I think I based the OpenACC deviceptr code on c_parser_omp_threadprivate --
does that have the same issue then?  Note that the C++ front end code for
OpenMP threadprivate, gcc/cp/parser.c:cp_parser_omp_threadprivate and
gcc/cp/semantics.c:finish_omp_threadprivate is different from the C code, which
probably also would be good to unify?


I have found the following note in my TODO list, which can then also be
verified/addressed at the same time:

      goto l;
     l:
    #pragma acc parallel deviceptr(l) /* { dg-error "'l' is not a pointer
variable" } */
      ;
    #pragma acc parallel deviceptr(l[1:3])
      /* { dg-error "'l' is not a pointer variable" "" { target *-*-* } 15 } */
      /* { dg-error "expected ')' before '\[' token" "" { target *-*-* } 15 }
*/
      ;


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

* [Bug sanitizer/64984] [5 Regression] ICE in check_noexcept_t with ubsan
       [not found] <bug-64984-4@http.gcc.gnu.org/bugzilla/>
  2015-02-10 10:04 ` [Bug sanitizer/64984] [5 Regression] ICE in check_noexcept_t with ubsan jakub at gcc dot gnu.org
  2015-02-10 12:28 ` larsbj at gullik dot net
@ 2015-02-12 15:39 ` jakub at gcc dot gnu.org
  2015-02-12 15:40 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-12 15:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Feb 12 15:38:33 2015
New Revision: 220649

URL: https://gcc.gnu.org/viewcvs?rev=220649&root=gcc&view=rev
Log:
    PR sanitizer/64984
    * except.c (check_noexcept_r): Return NULL for internal
    calls.

    * g++.dg/ubsan/pr64984.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/ubsan/pr64984.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/except.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug sanitizer/64984] [5 Regression] ICE in check_noexcept_t with ubsan
       [not found] <bug-64984-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2015-02-12 15:39 ` jakub at gcc dot gnu.org
@ 2015-02-12 15:40 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-12 15:40 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2015-02-12 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-64984-4@http.gcc.gnu.org/bugzilla/>
2015-02-10 10:04 ` [Bug sanitizer/64984] [5 Regression] ICE in check_noexcept_t with ubsan jakub at gcc dot gnu.org
2015-02-10 12:28 ` larsbj at gullik dot net
2015-02-12 15:39 ` jakub at gcc dot gnu.org
2015-02-12 15:40 ` jakub at gcc dot gnu.org

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).