[Issue 9131] Invalid UTF-8 when using std.algorithm.equal with dstring and string

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 20 14:48:50 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=9131


hsteoh at quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


--- Comment #4 from hsteoh at quickfur.ath.cx 2012-12-20 14:48:48 PST ---
Found the cause of this bug. It's a stack overflow caused by the transient
range struct using a large static array as buffer: it just takes a few copies
of this struct (since structs are passed by value) to overflow the stack, upon
which memory corruption starts happening.

The solution is to make TransientRange._buf a dynamic array whose length is
initialized in this(), instead of a static array.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list