Large number of tests failing - 64bit LDC with MSVC - Append Operator

Kevin Brogan via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue Feb 24 16:02:32 PST 2015


I've been able to successfully build LDC on 64 bit windows using 
msvc, but I've noticed that a large number of test suites fail 
with a segmentation fault instead of a regular error result.

I've been able to determine that many of the segmentation faults 
is due to the append operator.

The fault only occurs when using a variable, and only when two 
append operators are used in the same statement.

I was wondering if anyone can replicate this in their environment 
or have an idea of how to determine the cause.

An example is here:

import std.c.stdio : printf;
void main()
{
     string variable = "variable";
     printf("made a string\n");

     string result;

     result = "before " ~ variable;
     printf("before\n");

     result = variable ~ " after";
     printf("after\n");

     result = "before " ~ "novar" ~ " after";
     printf("novar\n");

     result = "before " ~ variable ~ " after"; // this line will 
seg fault
     printf("crashes before getting here\n");
}


More information about the digitalmars-d-ldc mailing list