public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: LIU Hao <lh_mouse@126.com>
To: Adrian Moreno <amorenoz@redhat.com>, gcc-help@gcc.gnu.org
Subject: Re: broken code only when optimized "-O2"
Date: Wed, 22 Dec 2021 23:32:37 +0800	[thread overview]
Message-ID: <caea0cc1-1fc2-5f8a-392f-3a4c5f3019e3@126.com> (raw)
In-Reply-To: <cc01d4b4-ab21-febe-2ae4-197cfdca1816@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 757 bytes --]

在 2021-12-21 23:40, Adrian Moreno via Gcc-help 写道:
> Hello,
> 
> I need some help understanding what might be wrong with a piece of code from the openvswitch 
> project. By ${subject} I'm not suggesting there's a problem in gcc, clang also shows the same 
> behavior so it's likely our code is broken. I am kindly asking for help to understand/troubleshoot 
> the problem.
> 

The typical approach to discovering such issues is to use address sanitizer [1] or valgrind [2]. The 
former is usually recommended. Optimization is not necessarily enabled.


[1] https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fsanitize_003daddress
[2] https://valgrind.org/docs/manual/quick-start.html


-- 
Best regards,
LIU Hao

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

      parent reply	other threads:[~2021-12-22 15:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21 15:40 Adrian Moreno
2021-12-21 16:05 ` Stefan Ring
2021-12-21 16:13   ` Adrian Moreno
2021-12-21 16:39     ` Segher Boessenkool
2021-12-21 17:05   ` David Brown
2021-12-22  9:24     ` Adrian Moreno
2021-12-22 10:27       ` Florian Weimer
2021-12-22 10:34         ` Adrian Moreno
2021-12-22 10:36           ` Xi Ruoyao
2021-12-22 16:05             ` Adrian Moreno
2021-12-22 15:32 ` LIU Hao [this message]

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=caea0cc1-1fc2-5f8a-392f-3a4c5f3019e3@126.com \
    --to=lh_mouse@126.com \
    --cc=amorenoz@redhat.com \
    --cc=gcc-help@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).