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: nob...@puremagic.com
        ReportedBy: turkey...@gmail.com


--- Comment #0 from Manu <turkey...@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: -------

Reply via email to