[Issue 13560] New: Several functions in std.uni can violate memory safety

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Oct 1 00:07:52 PDT 2014


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 at puremagic.com
          Reporter: ttanjo at 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.

--


More information about the Digitalmars-d-bugs mailing list