public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/12791] New: _M_extract_num returns a wrong __beg in case of error
@ 2003-10-27 17:22 paolo at gcc dot gnu dot org
2003-10-27 17:28 ` [Bug libstdc++/12791] " paolo at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-10-27 17:22 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12791
Summary: _M_extract_num returns a wrong __beg in case of error
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: paolo at gcc dot gnu dot org
ReportedBy: paolo at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: Any
It looks like time_get::_M_extract_num don't do the right thing wrt the final
value of __beg in case of error: the standard mandates that in case of error the
returned iterator points immediately beyond the last _character_ consumed as
part of a valid date value, but _M_extract_num checks only that the single chars
are digits and increments __beg, checking only _at the end_ the complete number vs
__min and __max!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/12791] _M_extract_num returns a wrong __beg in case of error
2003-10-27 17:22 [Bug libstdc++/12791] New: _M_extract_num returns a wrong __beg in case of error paolo at gcc dot gnu dot org
@ 2003-10-27 17:28 ` paolo at gcc dot gnu dot org
2003-11-28 11:43 ` paolo at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-10-27 17:28 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12791
paolo at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-10-27 17:22:19
date| |
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/12791] _M_extract_num returns a wrong __beg in case of error
2003-10-27 17:22 [Bug libstdc++/12791] New: _M_extract_num returns a wrong __beg in case of error paolo at gcc dot gnu dot org
2003-10-27 17:28 ` [Bug libstdc++/12791] " paolo at gcc dot gnu dot org
@ 2003-11-28 11:43 ` paolo at gcc dot gnu dot org
2003-12-03 9:17 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-11-28 11:43 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Last reconfirmed|2003-10-27 17:22:19 |2003-11-28 11:43:43
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12791
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/12791] _M_extract_num returns a wrong __beg in case of error
2003-10-27 17:22 [Bug libstdc++/12791] New: _M_extract_num returns a wrong __beg in case of error paolo at gcc dot gnu dot org
2003-10-27 17:28 ` [Bug libstdc++/12791] " paolo at gcc dot gnu dot org
2003-11-28 11:43 ` paolo at gcc dot gnu dot org
@ 2003-12-03 9:17 ` cvs-commit at gcc dot gnu dot org
2003-12-03 9:18 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-12-03 9:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-12-03 09:17 -------
Subject: Bug 12791
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: paolo@gcc.gnu.org 2003-12-03 09:17:22
Modified files:
libstdc++-v3/include/bits: locale_facets.tcc
libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t: 1.cc
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t:
1.cc
libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t: 1.cc
libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t: 1.cc
Added files:
libstdc++-v3/testsuite/22_locale/time_get/get_date/char:
12791.cc
libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t:
12791.cc
Log message:
2003-12-03 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12791
* include/bits/locale_facets.tcc (time_get::_M_extract_num):
Rewrite, stop the parsing as soon as a digit cannot possibly
lead to a final number within the bounds; otherwise, simplify,
avoiding __ctype.is() and atoi().
* testsuite/22_locale/time_get/get_date/char/12791.cc: New.
* testsuite/22_locale/time_get/get_date/wchar_t/12791.cc: New.
* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
Minor tweak: a 4-digit integer cannot be bigger than 9999.
* testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Use
type-correct wchar_t string literals.
* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Ditto.
* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Ditto.
* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Ditto.
* testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Ditto.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/locale_facets.tcc.diff?cvsroot=gcc&r1=1.150&r2=1.151
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12791.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12791.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc.diff?cvsroot=gcc&r1=1.4&r2=1.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc.diff?cvsroot=gcc&r1=1.4&r2=1.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc.diff?cvsroot=gcc&r1=1.4&r2=1.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc.diff?cvsroot=gcc&r1=1.4&r2=1.5
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12791
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/12791] _M_extract_num returns a wrong __beg in case of error
2003-10-27 17:22 [Bug libstdc++/12791] New: _M_extract_num returns a wrong __beg in case of error paolo at gcc dot gnu dot org
` (2 preceding siblings ...)
2003-12-03 9:17 ` cvs-commit at gcc dot gnu dot org
@ 2003-12-03 9:18 ` cvs-commit at gcc dot gnu dot org
2003-12-03 9:20 ` paolo at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-12-03 9:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-12-03 09:18 -------
Subject: Bug 12791
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: paolo@gcc.gnu.org 2003-12-03 09:18:29
Modified files:
libstdc++-v3 : ChangeLog
Log message:
2003-12-03 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12791
* include/bits/locale_facets.tcc (time_get::_M_extract_num):
Rewrite, stop the parsing as soon as a digit cannot possibly
lead to a final number within the bounds; otherwise, simplify,
avoiding __ctype.is() and atoi().
* testsuite/22_locale/time_get/get_date/char/12791.cc: New.
* testsuite/22_locale/time_get/get_date/wchar_t/12791.cc: New.
* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
Minor tweak: a 4-digit integer cannot be bigger than 9999.
* testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Use
type-correct wchar_t string literals.
* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Ditto.
* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Ditto.
* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Ditto.
* testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Ditto.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2126&r2=1.2127
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12791
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/12791] _M_extract_num returns a wrong __beg in case of error
2003-10-27 17:22 [Bug libstdc++/12791] New: _M_extract_num returns a wrong __beg in case of error paolo at gcc dot gnu dot org
` (3 preceding siblings ...)
2003-12-03 9:18 ` cvs-commit at gcc dot gnu dot org
@ 2003-12-03 9:20 ` paolo at gcc dot gnu dot org
2003-12-03 9:26 ` cvs-commit at gcc dot gnu dot org
2003-12-04 9:40 ` paolo at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-12-03 9:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From paolo at gcc dot gnu dot org 2003-12-03 09:20 -------
Fixed for 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12791
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/12791] _M_extract_num returns a wrong __beg in case of error
2003-10-27 17:22 [Bug libstdc++/12791] New: _M_extract_num returns a wrong __beg in case of error paolo at gcc dot gnu dot org
` (4 preceding siblings ...)
2003-12-03 9:20 ` paolo at gcc dot gnu dot org
@ 2003-12-03 9:26 ` cvs-commit at gcc dot gnu dot org
2003-12-04 9:40 ` paolo at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-12-03 9:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-12-03 09:26 -------
Subject: Bug 12791
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: paolo@gcc.gnu.org 2003-12-03 09:26:03
Modified files:
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t:
1.cc
Log message:
2003-12-03 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12791
* include/bits/locale_facets.tcc (time_get::_M_extract_num):
Rewrite, stop the parsing as soon as a digit cannot possibly
lead to a final number within the bounds; otherwise, simplify,
avoiding __ctype.is() and atoi().
* testsuite/22_locale/time_get/get_date/char/12791.cc: New.
* testsuite/22_locale/time_get/get_date/wchar_t/12791.cc: New.
* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
Minor tweak: a 4-digit integer cannot be bigger than 9999.
* testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Use
type-correct wchar_t string literals.
* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Ditto.
* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Ditto.
* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Ditto.
* testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Ditto.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc.diff?cvsroot=gcc&r1=1.4&r2=1.5
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12791
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libstdc++/12791] _M_extract_num returns a wrong __beg in case of error
2003-10-27 17:22 [Bug libstdc++/12791] New: _M_extract_num returns a wrong __beg in case of error paolo at gcc dot gnu dot org
` (5 preceding siblings ...)
2003-12-03 9:26 ` cvs-commit at gcc dot gnu dot org
@ 2003-12-04 9:40 ` paolo at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-12-04 9:40 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12791
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-12-04 9:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-27 17:22 [Bug libstdc++/12791] New: _M_extract_num returns a wrong __beg in case of error paolo at gcc dot gnu dot org
2003-10-27 17:28 ` [Bug libstdc++/12791] " paolo at gcc dot gnu dot org
2003-11-28 11:43 ` paolo at gcc dot gnu dot org
2003-12-03 9:17 ` cvs-commit at gcc dot gnu dot org
2003-12-03 9:18 ` cvs-commit at gcc dot gnu dot org
2003-12-03 9:20 ` paolo at gcc dot gnu dot org
2003-12-03 9:26 ` cvs-commit at gcc dot gnu dot org
2003-12-04 9:40 ` paolo 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).