[Issue 11560] New: API returning immutable string on stack?
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 19 22:37:14 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11560
Summary: API returning immutable string on stack?
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: critical
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: turkeyman at gmail.com
--- Comment #0 from Manu <turkeyman at gmail.com> 2013-11-19 22:37:12 PST ---
This code:
string hash = std.digest.digest.toHexString(std.digest.sha.sha1Of("text"));
Does it seem reasonable that users should expect that 'hash' is on the stack?
As the program continues, 'hash' starts changing randomly.
hash.idup, it persists as expected.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list