dmd memory usage/static lib/algorithm bug?

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Aug 28 15:14:16 PDT 2013


On Wed, Aug 28, 2013 at 02:10:34PM -0700, H. S. Teoh wrote:
> On Wed, Aug 28, 2013 at 11:02:17PM +0200, Marek Janukowicz wrote:
> > I was finally able to create simple test case that probably
> > reproduces the bug (probably, because the stack trace is completely
> > different, but the code that is there is similar). This requires 2
> > source code files:
> [...]
> > Run with: 
> > 
> > dmd -unittest main.d sorter.d && ./main
> > 
> > For me this results in a segfault. Changing one of many seemingly
> > unrelated details (eg. moving offending code directly to main,
> > commenting out std.stdio import in main.d) makes the problem
> > disappear.
> > 
> > Can anyone try to reproduce that? Again, I'm on DMD 2.063.2.
> 
> It doesn't seem to happen on git HEAD. I'm going to try 2.063.2 and
> see what happens.
[...]

Update: I've reproduced this problem on 2.063.2, but while trying to
track down the problem, I discovered that building 2.063.2 from source
doesn't produce a working toolchain. :-( I've spent an hour trying to
figure out what's wrong with 2.063.2, but with no success. So, you
*could* be right that something may be wrong with libphobos2.a.

I'll try to download the tarball from dlang.org again and see if that
helps, or if I've messed up my system somehow. :-P


T

-- 
There are two ways to write error-free programs; only the third one works.


More information about the Digitalmars-d-learn mailing list