[Issue 18026] Stack overflow in ddmd/dtemplate.d:6241, TemplateInstance::needsCodegen()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 7 13:54:57 UTC 2018


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

--- Comment #3 from JR <zorael at gmail.com> ---
I reduced it to 58 lines using dustmite, which is incidentally amazing.

Under 2.079.0, it compiles in -debug mode but doesn't outside of it. 2.078.3
can however compile it in both. The code is nonsense, but it appears to trigger
the behaviour.

> $ git clone https://github.com/zorael/kameloso -b 2.079-overflow
> $ cd kameloso
> $ dub build -b debug  # works
> 
> $ dub build -b plain
> /usr/bin/dmd failed with exit code -11.
> 
> $ gdb --batch -ex "run" --args dmd source/kameloso/*.d source/kameloso/plugins/*.d
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000555555825982 in TemplateInstance::needsCodegen() ()

I tested it on Travis and CircleCI. Both run 2.079.0, and Travis could not
reproduce the segfault. CircleCI however could! Please see
https://circleci.com/gh/zorael/kameloso/151.

Again, this seems to only affect 2.079.0, and only on *some* distributions.
Unless your linux installation sees the behaviour, I imagine the only way to
observe it is to download a Manjaro .iso and run it in a virtual machine.
Apologies.

I wish I could produce something more tangible but this is how ephemeral the
issue is.

--


More information about the Digitalmars-d-bugs mailing list