public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "veksler at il dot ibm dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/22200] numeric_limits<signed>::is_modulo is inconsistent with gcc
Date: Sun, 21 Feb 2010 13:33:00 -0000	[thread overview]
Message-ID: <20100221133338.30105.qmail@sourceware.org> (raw)
In-Reply-To: <bug-22200-2544@http.gcc.gnu.org/bugzilla/>



------- Comment #35 from veksler at il dot ibm dot com  2010-02-21 13:33 -------
(In reply to comment #34)
> (In reply to comment #33)
> > (In reply to comment #32)
> > > If this hazard is so prevalent shouldn't it deserve a separate PR?
> > > If a method or function depend on a flag or macro then it can be handled
> > > by overloading and specialization without ODR violation.
> > 
> > It would be closed immediately as WONTFIX, to be clear. There is nothing we can
> > do in the foreseeable future, it's **everywhere** and totally unfixable without
> > breaking ABI and much more than that.

Yes, it is a big task which is probably not worth it, but is it unfixable?
Is it possible that these ODR violations will ever be translated to security
issues? For example, the data structure is updated in one translation 
unit in a way that causes memory corruption when accessed by a different
definition in a different translation unit? This is all theoretic but
as history has shown, theoretic security threats become real - eventually.

> > I see that I'm not going to work on it. Actually, I'll wait one month or so,
> > and then if I will not get at least one concrete proposal, I will close this
> > one as WONTFIX.
> 
> Or suspend it.  I think this warrants a defect report anyway since I think
> is_modulo was intended to describe CPU behavior as otherwise defining
> signed integer overflow as undefined in one piece of the standard and
> then requiring a sane answer for is_modulo in another part sounds
> like a conflict of interest.
> 
Maybe it is better to make things clear, but I am not so sure of the 
outcome. I think that is_modulo is meaningful only if it is true, otherwise,
when false user's code can't rely on any specific behavior. 
Maybe is_modulo=false is the right answer even for -fwrapv after all.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22200


  parent reply	other threads:[~2010-02-21 13:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-22200-2544@http.gcc.gnu.org/bugzilla/>
2010-02-18 22:03 ` paolo dot carlini at oracle dot com
2010-02-19 10:22 ` rguenth at gcc dot gnu dot org
2010-02-19 10:30 ` paolo dot carlini at oracle dot com
2010-02-19 11:13 ` joseph at codesourcery dot com
2010-02-19 11:19 ` paolo dot carlini at oracle dot com
2010-02-19 11:26 ` paolo dot carlini at oracle dot com
2010-02-21  7:53 ` veksler at il dot ibm dot com
2010-02-21  9:51 ` paolo dot carlini at oracle dot com
2010-02-21 12:44 ` veksler at il dot ibm dot com
2010-02-21 12:54 ` paolo dot carlini at oracle dot com
2010-02-21 13:04 ` rguenth at gcc dot gnu dot org
2010-02-21 13:33 ` veksler at il dot ibm dot com [this message]
2010-02-21 13:37 ` rguenther at suse dot de
2010-02-21 18:04 ` gdr at integrable-solutions dot net
2010-02-21 18:20 ` veksler at il dot ibm dot com
2010-02-21 18:50 ` gdr at integrable-solutions dot net
     [not found] <bug-22200-4@http.gcc.gnu.org/bugzilla/>
2012-02-29 12:41 ` marc.glisse at normalesup dot org
2012-02-29 13:41 ` gdr at gcc dot gnu.org
2012-04-29  9:26 ` paolo at gcc dot gnu.org
2012-05-05  1:13 ` glisse at gcc dot gnu.org
2023-06-01  9:37 ` redi at gcc dot gnu.org
2024-02-07 10:09 ` redi at gcc dot gnu.org
2024-02-07 11:46 ` pinskia at gcc dot gnu.org

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=20100221133338.30105.qmail@sourceware.org \
    --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).