Memory error not reported correctly
I discovered recently that, when allocating sufficiently large arrays, XLALCreateREAL8ArrayL() does not correctly report errors. For example, if you apply the attached patch to today's (4 January 2018) LALSuite master branch and attempt to generate a waveform (try input parameters -a SEOBNRv3_opt -M 13 -m 11 -X 0.4 -y -0.8) a segfault appears after attempting to access the dense_buffers array. (The patch simply creates an enormous array in XLALAdaptiveRungeKuttaDenseandSparseOutput() of LALAdaptiveRungeKuttaIntegrator.c and includes print statements around the point at which the segfault appears. I'm running Ubuntu 18 on a desktop with 32 GB RAM.) I confirmed that if dense_buffers is created with malloc() rather than XLALCreateREAL8ArrayL(), the error-checking statement at about line 648 of LALAdaptiveRungeKuttaIntegrator.c is triggered appropriately. (Sorry if this example is poorly placed within LALSuite--it's simply the file I was working in when I discovered the issue.)
I admit that we should not have to make arrays this large, but while debugging another issue I traced a segfault back to this memory-error-reporting issue. It would be great to have this reported properly.memory_allocation_error.patch