[dmd-beta] D2 2.058 beta 4
Steve Schveighoffer
schveiguy at yahoo.com
Mon Feb 13 13:51:34 PST 2012
This can be any number of things. It seems like a corruption issue.
Just for your info, however, the code you quoted below is wasteful -- Starting with 2.041 or around there, the code you give will allocate a new array, then throw it away on the first append.
You are better off with this:
Attribute[] attrs;
attrs.reserve(tag.attr.length);
No, I don't think this will solve your problem. But it should avoid the throw-away initial array allocation.
-Steve
----- Original Message -----
> From: Jacob Carlborg <doob at me.com>
> To: Discuss the dmd beta releases for D <dmd-beta at puremagic.com>
> Cc:
> Sent: Monday, February 13, 2012 3:47 PM
> Subject: Re: [dmd-beta] D2 2.058 beta 4
>
>
> On 13 feb 2012, at 21:31, Jacob Carlborg wrote:
>
>>
>> On 13 feb 2012, at 21:16, Walter Bright wrote:
>>
>>>
>>>
>>> On 2/13/2012 12:03 PM, Jacob Carlborg wrote:
>>>> My serialization library Orange doesn't work with this beta. I
> get a segmentation fault. The backtrace from GDB seems to indicate some sort of
> infinite loop or recursion. I see some traces of "__lambda" in the
> backtrace but that is not used anywhere in my code.
>>>>
>>>> This is the part of the GDB backtrace that repeats itself.
>>>
>>>
>>> I'm sorry, but a back trace from your code is not useful to
> figuring out what went wrong. I don't have your code, know what you're
> doing, when did this problem appear, anything.
>>
>>
>> Yeah, I know, sorry. I just posted so you guys know while I'm working
> on a test case. Hmm, when I'm looking at the backtrace it might be another
> problem. It might be a problem with array appending or the GC, in this method:
>>
>>
> https://github.com/jacob-carlborg/orange/blob/master/orange/xml/PhobosXml.d#L764
>
>
> I'm seeing some general problem with array appending. Removing the append in
> the above method and the segfault moves to an other part of the code, which uses
> array appending.
>
> --
> /Jacob Carlborg
>
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>
More information about the dmd-beta
mailing list