www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3352] New: RangeError in std.conv

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3352

           Summary: RangeError in std.conv
           Product: D
           Version: 2.032
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: dfj1esp02 sneakemail.com


--- Comment #0 from Sobirari Muhomori <dfj1esp02 sneakemail.com> 2009-09-30
03:58:10 PDT ---
---
wtext(int.max);
---
core.exception.RangeError std.conv(2526): Range violation

Unittests in std.conv don't test wstring and big numbers.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 30 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3352


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei metalanguage.com


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 30 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3352



--- Comment #1 from Sobirari Muhomori <dfj1esp02 sneakemail.com> 2009-10-01
07:43:35 PDT ---
Also I think, it's an overkill to fine tune allocation as it's done in
to!string(uint)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 01 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3352



--- Comment #2 from Andrei Alexandrescu <andrei metalanguage.com> 2009-10-01
11:05:40 PDT ---
(In reply to comment #1)
 Also I think, it's an overkill to fine tune allocation as it's done in
 to!string(uint)

BTW I just improved optimization by adding preallocated strings for numbers between -1 and -9. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 01 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3352



--- Comment #3 from Sobirari Muhomori <dfj1esp02 sneakemail.com> 2009-10-05
06:59:13 PDT ---
The bug is in line 2526 where Char.sizeof * maxlength is allocated but only
maxlength is sliced for the buffer.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 05 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3352


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


--- Comment #4 from Andrei Alexandrescu <andrei metalanguage.com> 2009-10-05
18:39:56 PDT ---
(In reply to comment #3)
 The bug is in line 2526 where Char.sizeof * maxlength is allocated but only
 maxlength is sliced for the buffer.

Thanks! I just fixed the bug and checked in. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 05 2009