public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/21209] signed integer overflow in num_get<>::_M_extract_int
  2005-04-25  9:47 [Bug libstdc++/21209] New: signed integer overflow in num_get<>::_M_extract_int pcarlini at suse dot de
@ 2005-04-25  9:47 ` pcarlini at suse dot de
  2005-04-26  9:32 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2005-04-25  9:47 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-25 09:47:36
               date|                            |


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


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

* [Bug libstdc++/21209] New: signed integer overflow in num_get<>::_M_extract_int
@ 2005-04-25  9:47 pcarlini at suse dot de
  2005-04-25  9:47 ` [Bug libstdc++/21209] " pcarlini at suse dot de
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2005-04-25  9:47 UTC (permalink / raw)
  To: gcc-bugs

__new_result definitely overflows, and this is *bad* (at least in principle ;)
when it's signed. I have a patch in testing which has small (probably bearable)
performance implications.

-- 
           Summary: signed integer overflow in num_get<>::_M_extract_int
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: pcarlini at suse dot de
        ReportedBy: pcarlini at suse dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug libstdc++/21209] signed integer overflow in num_get<>::_M_extract_int
  2005-04-25  9:47 [Bug libstdc++/21209] New: signed integer overflow in num_get<>::_M_extract_int pcarlini at suse dot de
  2005-04-25  9:47 ` [Bug libstdc++/21209] " pcarlini at suse dot de
@ 2005-04-26  9:32 ` cvs-commit at gcc dot gnu dot org
  2005-05-03 12:15 ` pcarlini at suse dot de
  2005-05-03 12:25 ` cvs-commit at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-26  9:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-26 09:31 -------
Subject: Bug 21209

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	paolo@gcc.gnu.org	2005-04-26 09:31:07

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/bits: locale_facets.tcc 
Added files:
	libstdc++-v3/testsuite/22_locale/num_get/get/char: 16.cc 
	libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t: 16.cc 

Log message:
	2005-04-26  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/21209
	* include/bits/locale_facets.tcc (_M_extract_int): Avoid signed
	integer overflow, always use a suited unsigned type in the main
	parsing loop.
	(struct __to_unsigned_type): New.
	* testsuite/22_locale/num_get/get/char/16.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/16.cc: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2978&r2=1.2979
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/locale_facets.tcc.diff?cvsroot=gcc&r1=1.213&r2=1.214
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/num_get/get/char/16.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/16.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug libstdc++/21209] signed integer overflow in num_get<>::_M_extract_int
  2005-04-25  9:47 [Bug libstdc++/21209] New: signed integer overflow in num_get<>::_M_extract_int pcarlini at suse dot de
  2005-04-25  9:47 ` [Bug libstdc++/21209] " pcarlini at suse dot de
  2005-04-26  9:32 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-03 12:15 ` pcarlini at suse dot de
  2005-05-03 12:25 ` cvs-commit at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2005-05-03 12:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2005-05-03 12:03 -------
Fixed for 4.0.1.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.1


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


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

* [Bug libstdc++/21209] signed integer overflow in num_get<>::_M_extract_int
  2005-04-25  9:47 [Bug libstdc++/21209] New: signed integer overflow in num_get<>::_M_extract_int pcarlini at suse dot de
                   ` (2 preceding siblings ...)
  2005-05-03 12:15 ` pcarlini at suse dot de
@ 2005-05-03 12:25 ` cvs-commit at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-03 12:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-05-03 12:12 -------
Subject: Bug 21209

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	paolo@gcc.gnu.org	2005-05-03 12:02:14

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/bits: locale_facets.tcc 
Added files:
	libstdc++-v3/testsuite/22_locale/num_get/get/char: 16.cc 
	libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t: 16.cc 

Log message:
	2005-05-03  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/21209
	* include/bits/locale_facets.tcc (_M_extract_int): Avoid signed
	integer overflow, always use a suited unsigned type in the main
	parsing loop.
	(struct __to_unsigned_type): New.
	* testsuite/22_locale/num_get/get/char/16.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/16.cc: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.2917.2.37&r2=1.2917.2.38
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/locale_facets.tcc.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.211.12.2&r2=1.211.12.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/num_get/get/char/16.cc.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/16.cc.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.4.1



-- 


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


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

end of thread, other threads:[~2005-05-03 12:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-25  9:47 [Bug libstdc++/21209] New: signed integer overflow in num_get<>::_M_extract_int pcarlini at suse dot de
2005-04-25  9:47 ` [Bug libstdc++/21209] " pcarlini at suse dot de
2005-04-26  9:32 ` cvs-commit at gcc dot gnu dot org
2005-05-03 12:15 ` pcarlini at suse dot de
2005-05-03 12:25 ` cvs-commit at gcc dot gnu dot 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).