public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/99877] New: Crash in GIMPLE pass:sanopt in huge function using OpenMP
@ 2021-04-01 20:57 carl.nettelblad at it dot uu.se
  2021-04-01 21:33 ` [Bug sanitizer/99877] " carl.nettelblad at it dot uu.se
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: carl.nettelblad at it dot uu.se @ 2021-04-01 20:57 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99877
           Summary: Crash in GIMPLE pass:sanopt in huge function using
                    OpenMP
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: carl.nettelblad at it dot uu.se
                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, marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 50499
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50499&action=edit
Command line and output

This code has worked (seemingly) just fine until the new function
computecandcliques was added, with a heap corruption bug (in my own code).

When trying to track this bug down, I tried to compile the thing with address
sanitizer, but I kept getting crashes even when successively reducing
optimization settings and trying a few other things. I know this is certainly
not a minimal test case, but I hope it is reproducible for you with these
files. I did confirm crashes with very similar error output on optimization
levels 3 to 1 and on various versions of GCC 9.x and 10.x. I don't have ready
access to 10.2.1, though.

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

* [Bug sanitizer/99877] Crash in GIMPLE pass:sanopt in huge function using OpenMP
  2021-04-01 20:57 [Bug sanitizer/99877] New: Crash in GIMPLE pass:sanopt in huge function using OpenMP carl.nettelblad at it dot uu.se
@ 2021-04-01 21:33 ` carl.nettelblad at it dot uu.se
  2021-04-02  8:14 ` marxin at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: carl.nettelblad at it dot uu.se @ 2021-04-01 21:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Carl Nettelblad <carl.nettelblad at it dot uu.se> ---
Created attachment 50500
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50500&action=edit
Preprocessed source file

Fully preprocessed sources. Compressed only to fit bugzilla limit.

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

* [Bug sanitizer/99877] Crash in GIMPLE pass:sanopt in huge function using OpenMP
  2021-04-01 20:57 [Bug sanitizer/99877] New: Crash in GIMPLE pass:sanopt in huge function using OpenMP carl.nettelblad at it dot uu.se
  2021-04-01 21:33 ` [Bug sanitizer/99877] " carl.nettelblad at it dot uu.se
@ 2021-04-02  8:14 ` marxin at gcc dot gnu.org
  2021-04-02  9:29 ` [Bug sanitizer/99877] [8/9/10/11 Regression] Crash in GIMPLE pass:sanopt in huge function using OpenMP since r8-7544-gd838c2d5a8b1844c marxin at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-02  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-04-02
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Thank you for the report. I can reproduce it and I'm reducing the provided
test-case.

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

* [Bug sanitizer/99877] [8/9/10/11 Regression] Crash in GIMPLE pass:sanopt in huge function using OpenMP since r8-7544-gd838c2d5a8b1844c
  2021-04-01 20:57 [Bug sanitizer/99877] New: Crash in GIMPLE pass:sanopt in huge function using OpenMP carl.nettelblad at it dot uu.se
  2021-04-01 21:33 ` [Bug sanitizer/99877] " carl.nettelblad at it dot uu.se
  2021-04-02  8:14 ` marxin at gcc dot gnu.org
@ 2021-04-02  9:29 ` marxin at gcc dot gnu.org
  2021-04-06  7:41 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-02  9:29 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
            Summary|Crash in GIMPLE pass:sanopt |[8/9/10/11 Regression]
                   |in huge function using      |Crash in GIMPLE pass:sanopt
                   |OpenMP                      |in huge function using
                   |                            |OpenMP since
                   |                            |r8-7544-gd838c2d5a8b1844c

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:

$ cat pr99877.ii
struct vector {
  int size();
};
int main() {
  vector outqueue;
#pragma omp parallel
  {
    goto continueloop;
  continueloop:;
  }
  for (; outqueue.size();)
    ;
}

Started with r8-7544-gd838c2d5a8b1844c, I'll take a look.

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

* [Bug sanitizer/99877] [8/9/10/11 Regression] Crash in GIMPLE pass:sanopt in huge function using OpenMP since r8-7544-gd838c2d5a8b1844c
  2021-04-01 20:57 [Bug sanitizer/99877] New: Crash in GIMPLE pass:sanopt in huge function using OpenMP carl.nettelblad at it dot uu.se
                   ` (2 preceding siblings ...)
  2021-04-02  9:29 ` [Bug sanitizer/99877] [8/9/10/11 Regression] Crash in GIMPLE pass:sanopt in huge function using OpenMP since r8-7544-gd838c2d5a8b1844c marxin at gcc dot gnu.org
@ 2021-04-06  7:41 ` rguenth at gcc dot gnu.org
  2021-04-12  8:51 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-06  7:41 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |8.5
           Priority|P3                          |P2

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

* [Bug sanitizer/99877] [8/9/10/11 Regression] Crash in GIMPLE pass:sanopt in huge function using OpenMP since r8-7544-gd838c2d5a8b1844c
  2021-04-01 20:57 [Bug sanitizer/99877] New: Crash in GIMPLE pass:sanopt in huge function using OpenMP carl.nettelblad at it dot uu.se
                   ` (3 preceding siblings ...)
  2021-04-06  7:41 ` rguenth at gcc dot gnu.org
@ 2021-04-12  8:51 ` marxin at gcc dot gnu.org
  2021-04-12 11:34 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-12  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
I've got a patch candidate, testing now..

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

* [Bug sanitizer/99877] [8/9/10/11 Regression] Crash in GIMPLE pass:sanopt in huge function using OpenMP since r8-7544-gd838c2d5a8b1844c
  2021-04-01 20:57 [Bug sanitizer/99877] New: Crash in GIMPLE pass:sanopt in huge function using OpenMP carl.nettelblad at it dot uu.se
                   ` (4 preceding siblings ...)
  2021-04-12  8:51 ` marxin at gcc dot gnu.org
@ 2021-04-12 11:34 ` cvs-commit at gcc dot gnu.org
  2021-04-12 11:35 ` [Bug sanitizer/99877] [8/9/10 " marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-12 11:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:598359f627dec765eb74e31d9e96901a68bbfb97

commit r11-8130-g598359f627dec765eb74e31d9e96901a68bbfb97
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Apr 12 10:49:41 2021 +0200

    ASAN: do not unpoison in OpenMP context

    gcc/ChangeLog:

            PR sanitizer/99877
            * gimplify.c (gimplify_expr): Right now, we unpoison all
            variables before a goto <dest>. We should not do it if we are
            in a omp context.

    gcc/testsuite/ChangeLog:

            PR sanitizer/99877
            * g++.dg/asan/pr99877.C: New test.

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

* [Bug sanitizer/99877] [8/9/10 Regression] Crash in GIMPLE pass:sanopt in huge function using OpenMP since r8-7544-gd838c2d5a8b1844c
  2021-04-01 20:57 [Bug sanitizer/99877] New: Crash in GIMPLE pass:sanopt in huge function using OpenMP carl.nettelblad at it dot uu.se
                   ` (5 preceding siblings ...)
  2021-04-12 11:34 ` cvs-commit at gcc dot gnu.org
@ 2021-04-12 11:35 ` marxin at gcc dot gnu.org
  2021-04-12 11:49 ` carl.nettelblad at it dot uu.se
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-12 11:35 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[8/9/10/11 Regression]      |[8/9/10 Regression] Crash
                   |Crash in GIMPLE pass:sanopt |in GIMPLE pass:sanopt in
                   |in huge function using      |huge function using OpenMP
                   |OpenMP since                |since
                   |r8-7544-gd838c2d5a8b1844c   |r8-7544-gd838c2d5a8b1844c
      Known to work|                            |11.0

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on master so far.
@Carl: Are you interested in backport to GCC 10.x branch?

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

* [Bug sanitizer/99877] [8/9/10 Regression] Crash in GIMPLE pass:sanopt in huge function using OpenMP since r8-7544-gd838c2d5a8b1844c
  2021-04-01 20:57 [Bug sanitizer/99877] New: Crash in GIMPLE pass:sanopt in huge function using OpenMP carl.nettelblad at it dot uu.se
                   ` (6 preceding siblings ...)
  2021-04-12 11:35 ` [Bug sanitizer/99877] [8/9/10 " marxin at gcc dot gnu.org
@ 2021-04-12 11:49 ` carl.nettelblad at it dot uu.se
  2021-04-12 11:53 ` jakub at gcc dot gnu.org
  2021-04-12 12:17 ` marxin at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: carl.nettelblad at it dot uu.se @ 2021-04-12 11:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Carl Nettelblad <carl.nettelblad at it dot uu.se> ---
I solved the specific bug in my own code, but I had planned to use asan on that
codebase for quite a while, so the need to have some working compiler remains.
I'm not up to date on the planned release schedule. We get all major and minor
releases built for this cluster, but if 10.4 or 10.3.1 would be expected before
11.0 that would absolutely be a boon.

Hämta Outlook för Android<https://aka.ms/AAb9ysg>

________________________________
From: marxin at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>
Sent: Monday, April 12, 2021 1:35:49 PM
To: carl.nettelblad@it.uu.se <carl.nettelblad@it.uu.se>
Subject: [Bug sanitizer/99877] [8/9/10 Regression] Crash in GIMPLE pass:sanopt
in huge function using OpenMP since r8-7544-gd838c2d5a8b1844c

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[8/9/10/11 Regression]      |[8/9/10 Regression] Crash
                   |Crash in GIMPLE pass:sanopt |in GIMPLE pass:sanopt in
                   |in huge function using      |huge function using OpenMP
                   |OpenMP since                |since
                   |r8-7544-gd838c2d5a8b1844c   |r8-7544-gd838c2d5a8b1844c
      Known to work|                            |11.0

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on master so far.
@Carl: Are you interested in backport to GCC 10.x branch?

--
You are receiving this mail because:
You reported the bug.








När du har kontakt med oss på Uppsala universitet med e-post så innebär det att
vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du
läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/

E-mailing Uppsala University means that we will process your personal data. For
more information on how this is performed, please read here:
http://www.uu.se/en/about-uu/data-protection-policy

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

* [Bug sanitizer/99877] [8/9/10 Regression] Crash in GIMPLE pass:sanopt in huge function using OpenMP since r8-7544-gd838c2d5a8b1844c
  2021-04-01 20:57 [Bug sanitizer/99877] New: Crash in GIMPLE pass:sanopt in huge function using OpenMP carl.nettelblad at it dot uu.se
                   ` (7 preceding siblings ...)
  2021-04-12 11:49 ` carl.nettelblad at it dot uu.se
@ 2021-04-12 11:53 ` jakub at gcc dot gnu.org
  2021-04-12 12:17 ` marxin at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-12 11:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
10.3.1 is a version used by gcc snapshots in between 10.3.0 and 10.4.0
releases.
As 10.3.0 has been released less than a week ago, 10.4.0 will likely be
released next year (or in December this year), just check
https://gcc.gnu.org/releases.html#timeline for the past release dates.

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

* [Bug sanitizer/99877] [8/9/10 Regression] Crash in GIMPLE pass:sanopt in huge function using OpenMP since r8-7544-gd838c2d5a8b1844c
  2021-04-01 20:57 [Bug sanitizer/99877] New: Crash in GIMPLE pass:sanopt in huge function using OpenMP carl.nettelblad at it dot uu.se
                   ` (8 preceding siblings ...)
  2021-04-12 11:53 ` jakub at gcc dot gnu.org
@ 2021-04-12 12:17 ` marxin at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-12 12:17 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

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

--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
I'm going to close this as GCC 11.1.0 will be released in 3 weeks or so.

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

end of thread, other threads:[~2021-04-12 12:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 20:57 [Bug sanitizer/99877] New: Crash in GIMPLE pass:sanopt in huge function using OpenMP carl.nettelblad at it dot uu.se
2021-04-01 21:33 ` [Bug sanitizer/99877] " carl.nettelblad at it dot uu.se
2021-04-02  8:14 ` marxin at gcc dot gnu.org
2021-04-02  9:29 ` [Bug sanitizer/99877] [8/9/10/11 Regression] Crash in GIMPLE pass:sanopt in huge function using OpenMP since r8-7544-gd838c2d5a8b1844c marxin at gcc dot gnu.org
2021-04-06  7:41 ` rguenth at gcc dot gnu.org
2021-04-12  8:51 ` marxin at gcc dot gnu.org
2021-04-12 11:34 ` cvs-commit at gcc dot gnu.org
2021-04-12 11:35 ` [Bug sanitizer/99877] [8/9/10 " marxin at gcc dot gnu.org
2021-04-12 11:49 ` carl.nettelblad at it dot uu.se
2021-04-12 11:53 ` jakub at gcc dot gnu.org
2021-04-12 12:17 ` marxin 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).