Got interesting bug in DMD

Andrey Zherikov andrey.zherikov at gmail.com
Mon Oct 3 16:43:06 UTC 2022


On Monday, 3 October 2022 at 15:18:09 UTC, Tejas wrote:
> On Monday, 3 October 2022 at 14:48:57 UTC, Steven Schveighoffer 
> wrote:
>> On 10/2/22 7:18 AM, Andrey Zherikov wrote:
>>> Unfortunately this bug is not reproducible (when I reran, DMD 
>>> just segfault'ed) but it might point to the root cause of not 
>>> deterministic behavior of DMD.
>>
>> Is this an open source project or a project you are willing to 
>> share the code for so it can be tested outside your 
>> environment?
>>
>> This looks like memory corruption.
>>
>> -Steve
>
> I think it's his `argparse` package code, judging by a couple 
> of lines of the entire output he posted

Yes, it's `argparse` but refactored a bit. I pushed my 
[work-in-progress 
branch](https://github.com/andrey-zherikov/argparse/tree/refactor%2Bcrash) so:
- Compilable code is at [commit 
e4a622a](https://github.com/andrey-zherikov/argparse/tree/e4a622a63955301ad7d24d9a083ff96f7f878970) - compilation run was [successfull](https://github.com/andrey-zherikov/argparse/actions/runs/3175747696)
- Breaking change ([commit 
7fd06f5](https://github.com/andrey-zherikov/argparse/commit/7fd06f545bb55b0b129671d5b898f742d7268059)) - even [ldc core dumped](https://github.com/andrey-zherikov/argparse/actions/runs/3175781064/jobs/5174408645) (dmd run was cancelled due to this)


More information about the Digitalmars-d mailing list