public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/64888] New: ubsan doesn't work with openmp
@ 2015-01-31 17:20 mikulas at artax dot karlin.mff.cuni.cz
  2015-01-31 17:38 ` [Bug sanitizer/64888] " mpolacek at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: mikulas at artax dot karlin.mff.cuni.cz @ 2015-01-31 17:20 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 4558 bytes --]

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

            Bug ID: 64888
           Summary: ubsan doesn't work with openmp
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mikulas at artax dot karlin.mff.cuni.cz
                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

Undefined behavior sanitizer and openmp don't work together. Ubsan generates
some internal variables and openmp complains that shareability of these
variables haven't been defined. Try to compile this program with
gcc -fsanitize=undefined -fopenmp openmp-ubsan.c

#include <omp.h>

int main(void)
{
        unsigned a = 1;
        unsigned b = 2;
        unsigned c;
#pragma omp parallel default(none) shared(a,b) private(c)
        {
                c = a / b;
        }
}

openmp-ubsan.c: In function ‘main’:
openmp-ubsan.c:10:9: error: ‘*.Lubsan_data0’ not specified in enclosing
parallel
   c = a / b;
         ^
openmp-ubsan.c:8:9: error: enclosing parallel
 #pragma omp parallel default(none) shared(a,b) private(c)
         ^
>From gcc-bugs-return-475644-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jan 31 17:23:44 2015
Return-Path: <gcc-bugs-return-475644-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30289 invoked by alias); 31 Jan 2015 17:23:43 -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 30259 invoked by uid 48); 31 Jan 2015 17:23:40 -0000
From: "ysato at users dot sourceforge.jp" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/64889] New: [h8300] ICE maybe_record_trace_start, at dwarf2cfi.c:2318
Date: Sat, 31 Jan 2015 17:23:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ysato at users dot sourceforge.jp
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 attachments.created
Message-ID: <bug-64889-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-01/txt/msg03638.txt.bz2
Content-length: 1401

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

            Bug ID: 64889
           Summary: [h8300] ICE maybe_record_trace_start, at
                    dwarf2cfi.c:2318
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ysato at users dot sourceforge.jp

Created attachment 34639
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id4639&actioníit
reproduce on ICE

reporoduce code attached.

$ h8300-elf-gcc -mh -mint32 -Os -g -fomit-frame-pointer -c namei.c
namei.c: In function 'SYSC_mknodat':
namei.c:38:6: warning: implicit declaration of function 'new_decode_dev'
[-Wimplicit-function-declaration]
      new_decode_dev(dev));
      ^
../../linux/namei.c:42:1: internal compiler error: in maybe_record_trace_start,
at dwarf2cfi.c:2318
 }
 ^
0x6d1d87 maybe_record_trace_start
    ../../gcc/dwarf2cfi.c:2318
0x6d2640 scan_trace
    ../../gcc/dwarf2cfi.c:2496
0x6d2e4a create_cfi_notes
    ../../gcc/dwarf2cfi.c:2650
0x6d2e4a execute_dwarf2_frame
    ../../gcc/dwarf2cfi.c:3006
0x6d2e4a execute
    ../../gcc/dwarf2cfi.c:3486
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

end of thread, other threads:[~2022-05-11  6:32 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-31 17:20 [Bug sanitizer/64888] New: ubsan doesn't work with openmp mikulas at artax dot karlin.mff.cuni.cz
2015-01-31 17:38 ` [Bug sanitizer/64888] " mpolacek at gcc dot gnu.org
2015-09-23 16:55 ` mpolacek at gcc dot gnu.org
2015-09-23 22:21 ` mikulas at artax dot karlin.mff.cuni.cz
2015-09-24  8:18 ` mpolacek at gcc dot gnu.org
2021-10-19  8:09 ` claudiokozicky at gmail dot com
2021-10-19  8:16 ` claudiokozicky at gmail dot com
2021-10-19  8:25 ` claudiokozicky at gmail dot com
2021-10-19  8:28 ` claudiokozicky at gmail dot com
2021-10-20 10:44 ` [Bug middle-end/64888] " jakub at gcc dot gnu.org
2021-10-21  8:30 ` cvs-commit at gcc dot gnu.org
2021-11-29  8:49 ` cvs-commit at gcc dot gnu.org
2022-05-10  8:21 ` cvs-commit at gcc dot gnu.org
2022-05-11  6:22 ` cvs-commit at gcc dot gnu.org
2022-05-11  6:32 ` 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).