Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch meas_astrom v11.0 to prevent a.d.n SIGSEVs
W/o this patch, astrometry.net will SIGSEV under some circumstances (*) when running the SDSS demo. By default a.d.n is built with optimizations turned on, which (among other things) disables checking of assert statements. That would've caught the fact we were calling healpixDistance() with healpix=-1, which is illegal. This patch changes the test in isWithinRange() to test for healpix == -1 (instead of nside == 0) when deciding whether it's permissible to call healpixDistance(). (*) This bug was discovered when the stack was built on CentOS 5 and the generated binaries were executed on CentOS 6 (with different glibc). Running CentOS5-built binaries on CentOS 5 (and CentOS 6 binaries on CentOS 6) did not reveal it. Demonstrates how testing in different environments can reveal subtle bugs (**). (**) This bug would've been caught immediately if assertions weren't turned off in astrometry.net. We should turn them back on for our builds.
- Loading branch information