Got compiler crash in Mangler::mangleFuncType

Uranuz via Digitalmars-d digitalmars-d at puremagic.com
Sat Mar 25 06:34:43 PDT 2017


On Saturday, 25 March 2017 at 07:57:11 UTC, Stefan Koch wrote:
> On Saturday, 25 March 2017 at 06:56:40 UTC, Uranuz wrote:
>> After changes in my project tried to compile, but compiler 
>> failed. Running dmd under GDB gives the following:
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00000000005807a0 in Mangler::mangleFuncType(TypeFunction*, 
>> TypeFunction*, unsigned char, Type*) ()
>>
>> Could someone give me adivice how to investigate and maybe fix 
>> this problem?
>
> Switch to git ~master and see if it still occurs.
> Also if you can share the source I am happy to debug this.

If you wish to help. You are welcome) I created branch in my 
repository `https://github.com/uranuz/ivy` called 
`v0.1/fail_on_compiler_error`. Seems that error depends on the 
order of source files that were passed to DMD. The way that error 
occurs is using RDMD utility, by running command(in project root 
folder):
rdmd "-Isrc/" -ofsimple_run_test test/simple_run_test.d

But if I run it using `dub` it compiles successfully(config is in 
dub.json):
dub run -c simple_run_test

Printing actual dmd command, used to compile project shows that 
dub puts `simple_run_test.d` at the end of source files list, but 
rdmd puts it at the beginning. And DMD fails in the first case 
without printing any adequate error message? Is there any ideas 
about it, besides using `dub` everywhere?)..



More information about the Digitalmars-d mailing list