Skip to content

Fix SEOBNRv3_opt rebuffering error in which unset memory is read

Tyler Knowles requested to merge tyler.knowles/lalsuite:fix_rebuffer into master

I recently discovered that, in rare cases, unset memory is read when (re)allocating memory for an array in SEOBNRv3_opt. For example, using input parameters

--approximant SEOBNRv3 --f-min 1.9000000000000000e+01 --m1 3.7635890000000001e+00 --m2 1.9071950000000001e+01 --spin1x 1.6523170000000001e-01 --spin1y 4.0220140000000001e-02 --spin1z 1.2255790000000000e-01 --spin2x -5.2007309999999995e-01 --spin2y 6.5866279999999999e-01 --spin2z 2.1566820000000000e-01 --inclination 1.5993160000000000e+00 --distance 1.0000000000000000e+00 --phiRef 5.8140280000000004e+00 --sample-rate 1.6384000000000000e+04

the result of reading unset memory appears as a spurious value of zero late in the inspiral (plot one of the dynamic variables in the "dynamics" array after integration, at about line 1713 of LALSimIMRSpinPrecEOB.c). This error is fixed by editing four lines of SEOBNRv3_opt's RK8 integration routine (ensuring that the variable "dense_outputlength" is indeed the length of the array and not the index of the most recently-added datum), and constitutes the entirety of this merge request.

Fixing this error does not significantly alter the waveform output of SEOBNRv3_opt. About a year ago, a set of 100,000 faithfulness tests comparing the SEOBNRv3 and SEOBNRv3_opt waveforms (on the master branch of LALSuite at that time) gave the following results:

faithfulness < 0.8 : 4
faithfulness < 0.9 : 40
faithfulness < 0.95 : 134
faithfulness < 0.99 : 1258
faithfulness < 0.999 : 5725

Comparing SEOBNRv3 and SEOBNRv3_opt with this error fixed gives:

faithfulness < 0.8 : 4
faithfulness < 0.9 : 40
faithfulness < 0.95 : 135
faithfulness < 0.99 : 1256
faithfulness < 0.999 : 5731

Edited by Ghost User

Merge request reports

Loading