Don't call methods on NULL pointers when built with a modern compiler.


MarkC just reported that condor_annex status segfaults on

I investigated, and condor_annex -status also fails. They both also failed on, which has a debbuger; the problem is that the status commands are looking up an attribute in a NULL ClassAd pointer.

This used to “work” because an accident of construction: the method in question would exit a loop early if this were NULL. However, newer compilers “know” that this is never NULL and skip the check (at least the first time through the loop).


Todd L Miller
March 4, 2021, 10:33 PM

To explain last three commits: the code was initially pushed to the 8.8 branch for 8.8.14 and then cherry-picked into the 8.8.13 branch; the release note was copied to 8.8.13 branch but moved to the appropriate section; and the original release note was reverted out of the 8.8 branch to avoid duplication.

Jaime Frey
March 4, 2021, 10:04 PM

Code Review

Code looks good.

Time remaining



Todd L Miller