Ref: rust-lang/rust#121305
In that Rust issue, running on an i686 host, I found that DenseMap::allocateBuckets -> llvm::allocate_buffer -> operator new was throwing std::bad_alloc. Then when unwinding runs the destructors into LLVMContextDispose, we get back into DenseMapBase::erase and hit SIGSEGV, presumably in the same instance that failed allocation.
Maybe allocate_buffer should catch and call report_bad_alloc_error like the safe_*alloc functions do? But even so, it seems that some part of DenseMap is not exception safe.
Ref: rust-lang/rust#121305
In that Rust issue, running on an
i686host, I found thatDenseMap::allocateBuckets->llvm::allocate_buffer->operator newwas throwingstd::bad_alloc. Then when unwinding runs the destructors intoLLVMContextDispose, we get back intoDenseMapBase::eraseand hitSIGSEGV, presumably in the same instance that failed allocation.Maybe
allocate_buffershould catch and callreport_bad_alloc_errorlike thesafe_*allocfunctions do? But even so, it seems that some part ofDenseMapis not exception safe.