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

          Issue ID: 18941
           Summary: Memory corruption when using a mixin template
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: b2.t...@gmx.com

Created attachment 1701
  --> https://issues.dlang.org/attachment.cgi?id=1701&action=edit
to be run with dub as a single file package

The bug happens in libdparse. When a specific version identifier is passed to
DMD, a template mixin is used to trace entering and leaving of a function. 

In a particular function (parseType2()) this causes data corruption, which is
known for being responsible of false positives in the dlang CI based on
D-Scanner (LHS and RHS identical in phobos typecons.d).

Unfortunately, the problem is not reduced at all. The source file provided will
just tells if the bug is fixed or not.

Run "dub bug.d" to see the assertion failure.
Remove the "versions" line from the DUB recipe to see that without the trace
code data are not corrupted and the assertion passes.

--

Reply via email to