[phobos] FreeBSD 32 still fails unittests for std.datetime

Steve Schveighoffer schveiguy at yahoo.com
Tue May 3 07:39:38 PDT 2011


Dmd has steadily been making binaries more bloated for the last couple years (many times pointed out in the NG and there are several bugzilla reports).


Also, I discovered dmd has a problem with unit tests affecting object size, even when they are turned off.  See a bug I created:

http://d.puremagic.com/issues/show_bug.cgi?id=5560


I'm not so sure dmd doesn't play a role in this problem.  There is definitely something going on with the compiler adding unnecessary bloat somewhere.  It seems to have to do with the -lib switch.

Has anyone tried compiling phobos without the -lib switch to see if it helps?


-Steve




>________________________________
>From: Walter Bright <walter at digitalmars.com>
>To: Discuss the phobos library for D <phobos at puremagic.com>
>Sent: Tuesday, May 3, 2011 1:43 AM
>Subject: Re: [phobos] FreeBSD 32 still fails unittests for std.datetime
>
>
>
>On 5/2/2011 9:18 PM, Walter Bright wrote:
>>
>>
>> On 5/2/2011 1:14 PM, Jonathan M Davis wrote:
>>>
>>> The problem is far worse on Windows than on Linux - both in terms of the
>>> amount of memory eaten by dmd and because the Windows unit tests are all
>>> compiled together instead of separately, but dmd still eats too much memory on
>>> OSes other than Windows. FreeBSD would have the unit tests compiled separately
>>> like on Linux, so dmd shouldn't be running out of memory in the same way as
>>> occurs on Windows, but it could still be using a lot of memory, and if
>>> Walter's machine doesn't have a lot of it, and if FreeBSD tries to kill
>>> processes that use too much, then that could be the problem. On Windows, it
>>> very clearly states that dmd ran out of memory, but if the OS just kills the
>>> process, then you might not get such a clear message.
>>>
>>> I've been hoping that Don's CTFE fixes would reduce dmd's memory footprint
>>> enough to get rid of issue 5454, but since they're buggy enough that Phobos'
>>> unit tests don't currently build, I have no idea how close they've gotten to
>>> fixing the problem.
>>>
>>
>> On FreeBSD it's getting a "Killed: 9" message while running dmd after running 
>> for a looong time. Running under gdb shows it dying somewhere deep in malloc().
>>
>
>By deleting unittests one by one, I got it to pass dmd. Now if fails with a 
>"Killed: 9" message from ld, the linker. Checking the object file for datetime.o 
>yields a 4.6 Mb file (and that's without debug info turned on!). Clearly, 
>reducing the memory consumption of dmd will not fix this problem.
>
>Compiling std.datetime with -release -O gives a 441,000 byte object file.
>_______________________________________________
>phobos mailing list
>phobos at puremagic.com
>http://lists.puremagic.com/mailman/listinfo/phobos
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20110503/21e1cff6/attachment.html>


More information about the phobos mailing list