D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17282 - [REG 2.074.0-b1] std.conv.parse throws with -debug
Summary: [REG 2.074.0-b1] std.conv.parse throws with -debug
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-29 00:02 UTC by Roman
Modified: 2018-01-05 13:28 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Roman 2017-03-29 00:02:45 UTC
This code

import std.conv;

void main()
{
    import std.stdio;
    auto str = "0=\x00\x02\x55\x40&\xff\xf0\n\x00\x04\x55\x40\xff\xf0~4+10\n";
    writeln(parse!uint(str));
}

throws "UTFException" when compiled with '-debug', but does not throw otherwise.

I believe this is not expected behavior. std.conv.parse should not care about the rest of the content, and just stop after reading the number.
Comment 1 Jack Stouffer 2017-03-29 14:14:22 UTC
https://github.com/dlang/phobos/pull/5310
Comment 2 github-bugzilla 2017-04-06 14:03:07 UTC
Commits pushed to stable at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/813efcb7e4b6c109f223cd00013218fbd289025d
Fix Issue 17282 - std.conv.parse throws with -debug

https://github.com/dlang/phobos/commit/34ad8b488d3a32f94b12a61f49c55ebf34533073
Merge pull request #5310 from JackStouffer/issue17282

[REG] Fix Issue 17282 - std.conv.parse throws with -debug
merged-on-behalf-of: Martin Nowak <code@dawg.eu>
Comment 3 github-bugzilla 2017-05-29 23:02:10 UTC
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/813efcb7e4b6c109f223cd00013218fbd289025d
Fix Issue 17282 - std.conv.parse throws with -debug

https://github.com/dlang/phobos/commit/34ad8b488d3a32f94b12a61f49c55ebf34533073
Merge pull request #5310 from JackStouffer/issue17282
Comment 4 github-bugzilla 2017-08-07 12:26:36 UTC
Commits pushed to newCTFE at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/813efcb7e4b6c109f223cd00013218fbd289025d
Fix Issue 17282 - std.conv.parse throws with -debug

https://github.com/dlang/phobos/commit/34ad8b488d3a32f94b12a61f49c55ebf34533073
Merge pull request #5310 from JackStouffer/issue17282
Comment 5 github-bugzilla 2018-01-05 13:28:01 UTC
Commits pushed to dmd-cxx at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/813efcb7e4b6c109f223cd00013218fbd289025d
Fix Issue 17282 - std.conv.parse throws with -debug

https://github.com/dlang/phobos/commit/34ad8b488d3a32f94b12a61f49c55ebf34533073
Merge pull request #5310 from JackStouffer/issue17282