std.json segmentation fault

Vladimir Panteleev vladimir at thecybershadow.net
Mon Feb 4 13:16:50 PST 2013


On Monday, 4 February 2013 at 10:04:10 UTC, Andrea Fontana wrote:
> This code was working some months ago:
>
> import std.json;
> JSONValue total;
> total.type = JSON_TYPE.OBJECT;
> total["results"].type = JSON_TYPE.OBJECT;
>
>
> Now, last line gives me a segmentation fault. What's wrong with 
> this code?

https://github.com/D-Programming-Language/phobos/pull/561/files

Is this code right? Has it ever worked? I don't think returning a 
ref value of an AA works for adding items to an AA.

That pull request didn't come with any unit tests... shouldn't 
have made it through review, IMO.


More information about the Digitalmars-d mailing list