www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13560] New: Several functions in std.uni can violate memory

https://issues.dlang.org/show_bug.cgi?id=13560

          Issue ID: 13560
           Summary: Several functions in std.uni can violate memory safety
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: ttanjo gmail.com

In std/uni.d, there is a line with ` trusted:` in the line 6380.
But decodeGrapheme, byGrapheme and other functions should not be trusted
because their memory safety depends on the static argument for them.

Furthermore, there are several functions and methods individually marked as
trusted/safe after the line 6380.
Other functions after line 6380 seem to be accidentally marked as trusted.

We should remove such ` trusted:` and make each function safe or trusted after
carefully checking its memory safety.

--
Oct 01 2014