public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "djordje.baljozovic at ac dot rwth-aachen.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/115345] [12/13/14/15 Regression] Different outputs compared to GCC 11- and MSVC/Clang
Date: Thu, 06 Jun 2024 10:57:29 +0000	[thread overview]
Message-ID: <bug-115345-4-ARTjKRsAfh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-115345-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #13 from Djordje Baljozovic <djordje.baljozovic at ac dot rwth-aachen.de> ---
(In reply to Richard Biener from comment #12)
> (In reply to Djordje Baljozovic from comment #11)
> > (In reply to Djordje Baljozovic from comment #9)
> > > (In reply to Andrew Pinski from comment #7)
> > > > A few questions, does `-fsanitize=undefined -fsanitize=address` report
> > > > anything? Does it work at -O0 and not just -O3? Does adding
> > > > -fno-strict-aliasing to the command line "fix" the crash? Are there any
> > > > warnings with `-Wextra -Wall` that might be causing an issue?
> > > 
> > > Have not tested -O0 and -fno-strict-aliasing; will let you know if this
> > > fixed the problem.
> > > No warnings with -Wextra -Wall to my knowledge.
> > > 
> > > Sincerely,
> > > George
> > 
> > Hi Andrew and Jakub,
> > The results are more than interesting:
> > 
> > 1. -fno-strict-aliasing: none of the inputs processed (with O3)
> > 2. O0: all but one input processed
> > 3. O3: none of the inputs processed
> > 4. O1 and O2: all inputs processed without any issues -- this did it.
> > 
> > Now the question is: how on Earth did O1/O2 do the trick, and not O0?!
> 
> Can you check whether -O0 works with the other compilers?  It feels like
> you might be triggering some undefined behavior in your code.
> 
> If you have a short running example that breaks with -O0 it might be
> also interesting to run it through valgrind to spot use-after-free
> or uninitialized use issues.
> 
> > Once again, thanks a lot for your detailed and quick responses.
> > George
> > P.S. I will keep @Jakub's bisect idea in mind if something like this happens
> > in the future.

Hi Richard,
Yes, I think that testing O0 with other compilers makes sense.
BTW, do you think that running the code through valgrind can identify some
issues which are not detected by fuzzers?
Thanks,
George

  parent reply	other threads:[~2024-06-06 10:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04 14:32 [Bug c/115345] New: [12/13/14 REGRESSION] / " djordje.baljozovic at ac dot rwth-aachen.de
2024-06-04 14:39 ` [Bug c/115345] " djordje.baljozovic at ac dot rwth-aachen.de
2024-06-04 14:44 ` djordje.baljozovic at ac dot rwth-aachen.de
2024-06-04 14:49 ` djordje.baljozovic at ac dot rwth-aachen.de
2024-06-04 14:51 ` djordje.baljozovic at ac dot rwth-aachen.de
2024-06-04 15:10 ` [Bug c/115345] [12/13/14/15 Regression] " jakub at gcc dot gnu.org
2024-06-04 16:33 ` [Bug middle-end/115345] " djordje.baljozovic at ac dot rwth-aachen.de
2024-06-04 16:48 ` pinskia at gcc dot gnu.org
2024-06-04 16:58 ` jakub at gcc dot gnu.org
2024-06-04 17:03 ` djordje.baljozovic at ac dot rwth-aachen.de
2024-06-04 17:11 ` djordje.baljozovic at ac dot rwth-aachen.de
2024-06-04 18:43 ` djordje.baljozovic at ac dot rwth-aachen.de
2024-06-05  6:59 ` rguenth at gcc dot gnu.org
2024-06-06 10:57 ` djordje.baljozovic at ac dot rwth-aachen.de [this message]
2024-06-06 17:08 ` sjames at gcc dot gnu.org
2024-06-06 19:18 ` djordje.baljozovic at ac dot rwth-aachen.de
2024-06-27 13:42 ` djordje.baljozovic at ac dot rwth-aachen.de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-115345-4-ARTjKRsAfh@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).