Help with failing assert in dmd.backend.symbol.d

Nicholas Wilson iamthewilsonator at hotmail.com
Thu Sep 1 22:48:59 UTC 2022


On Thursday, 1 September 2022 at 19:24:24 UTC, Teodor Dutu wrote:
> Hi,
>
> I have recently opened [this 
> PR](https://github.com/dlang/dmd/pull/14382) to change 
> `_d_arraysetassign` to a template. It has caused [this builkite 
> failure in 
> vibe-d](https://buildkite.com/dlang/dmd/builds/27898#0182f34a-7f4a-49f9-8b93-01e5ba42998b). I am able to reproduced it locally, but I am unable to debug it.
>
> Being a backend error, the `Symbol` struct doesn't seem to 
> store precise information about the line and file from where 
> that symbol comes. I have used `Symbol.lposscopestart`, but 
> that only tells where the symbol was created. In my case, it 
> was created here: `phobos/std/typecons.d(6822)`, but this 
> doesn't provide me with too much info.
>
> How would you debug this? Do you have any "tips" for debugging 
> the backend? I'd also like to build vibe-d without dub so I can 
> trace the compiler directly. How can I do this?
>
> Thanks for the help,
> Teodor

You should be able to run dub in verbose mode to spit out the 
compiler and linker invocations. From there, I'd recommend dust 
mite to create a minimal (or at least smaller) example. Then 
there are a bunch of hidden debug switches 
https://github.com/dlang/dmd/pull/14356 that may help.


More information about the Digitalmars-d mailing list