D-Programming-Language/druntime — pull request #110 by ibuclaw (2012-01-02 02:10:48+00:00)
Title: Prevent possible null pointer deref in _d_arrayappendcTX

This was a bug raised by dsimcha in gdc several days ago which appears to be a concurrency bug within druntime, and was found to be reproducible in gdc and ldc, but not dmd for whatever reason.

original report: https://bitbucket.org/goshawk/gdc/issue/295/null-pointer-deref-in-_d_arrayappendctp#comment-918920

I've done the most obvious thing and added a check for null pointer, which fixes the issue. Can you check to make sure it makes sense to do this?

Thanks