Fix, or rather work around an ages old double-free crash which sometimes
authorPanu Matilainen <pmatilai@turre.koti.laiskiainen.org>
Sun, 8 Jul 2007 12:36:10 +0000 (15:36 +0300)
committerPanu Matilainen <pmatilai@turre.koti.laiskiainen.org>
Sun, 8 Jul 2007 12:36:10 +0000 (15:36 +0300)
commit44db525ce86a2295217a241a8d15d27f8a7281c5
treed05b4077c00bec62e06f1d5920baa59b716c2484
parentccd847cc66286b99e1316cb436ef221b38041fb7
Fix, or rather work around an ages old double-free crash which sometimes
happens when ctrl-C is hit. Rpmlib blocks signals during some operations
and when it catches a deadly one, it clears all open iterators and db's
behind our back, and when the control returns to apt we try to free the
ts again, causing a double-free deep within rpmlib. It seems that some
elements aren't cleared within rpmdbCheckSignals() mop-up, probably because
it's supposed to exit() and never return to caller if terminating signal
was caught. The WTF here is: how come exit() doesn't actually exit but
returns to apt - that part is not supposed to be running in a thread or
separate process. Hum.
apt-pkg/rpm/rpmhandler.cc