# # patch "ChangeLog" # from [15effb273914ce8e0e95390ced4f4702606406e8] # to [032d75c0d833ad2afcc6b6198e81ceb5079dabcf] # # patch "sanity.cc" # from [866f9792a775f35ba10fdc2713095c5fa43173fb] # to [468c10ec824d8d872511b15c6d3feab05c326634] # # patch "sanity.hh" # from [2ad04caf94675dc7c13290e7e52551013b5136c7] # to [bc449c279746c70f6cfa69f7854b479684744078] # =============================================== --- ChangeLog 15effb273914ce8e0e95390ced4f4702606406e8 +++ ChangeLog 032d75c0d833ad2afcc6b6198e81ceb5079dabcf @@ -1,5 +1,10 @@ 2005-07-24 Nathaniel Smith + * sanity.{hh,cc} (sanity::already_dumping, gasp): Don't let gasp + be called recursively, in case a dump triggers an invariant. + +2005-07-24 Nathaniel Smith + * sanity.cc (gasp): Make more robust against new errors triggered during error unwind. (write_change_set in particular likes to blow up when handling in invalid change_set.) =============================================== --- sanity.cc 866f9792a775f35ba10fdc2713095c5fa43173fb +++ sanity.cc 468c10ec824d8d872511b15c6d3feab05c326634 @@ -30,7 +30,7 @@ sanity global_sanity; sanity::sanity() : - debug(false), quiet(false), relaxed(false), logbuf(0xffff) + debug(false), quiet(false), relaxed(false), logbuf(0xffff), already_dumping(false) { std::string flavour; get_system_flavour(flavour); @@ -241,6 +241,12 @@ void sanity::gasp() { + if (already_dumping) + { + L(F("ignoring request to give last gasp; already in process of dumping\n")); + return; + } + already_dumping = true; L(F("saving current work set: %i items") % musings.size()); std::ostringstream out; out << F("Current work set: %i items\n") % musings.size(); =============================================== --- sanity.hh 2ad04caf94675dc7c13290e7e52551013b5136c7 +++ sanity.hh bc449c279746c70f6cfa69f7854b479684744078 @@ -55,6 +55,7 @@ boost::circular_buffer logbuf; std::string filename; std::string gasp_dump; + bool already_dumping; std::vector musings; void log(boost::format const & fmt,