Bug 18941 – Memory corruption when using a mixin template

Status
RESOLVED
Resolution
INVALID
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-06-04T04:31:03Z
Last change time
2019-04-15T22:17:17Z
Assigned to
No Owner
Creator
Basile-z

Attachments

IDFilenameSummaryContent-TypeSize
1701bug.dto be run with dub as a single file packagetext/x-dsrc244974

Comments

Comment #0 by b2.temp — 2018-06-04T04:31:03Z
Created attachment 1701 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.
Comment #1 by b2.temp — 2019-04-15T22:17:17Z
the report doesn't work anymore.