When building log4cxx as multi byte instead of wchar_t there's a bug in Transcoder::encode(const LogString& src, std::wstring& dst).
If you pass an invalid multibyte string for src the Transcoder::decode function will return 0xffff and not advance the iterator i. The encode will then stick cp into dst over and over. Depending on whether your 32bit or 64bit you either get a crash when you blow past your 2/4 GB address space, or in 64bit you use up all available system resources and essentially lock up the OS.
Here's the fix I've applied to my local version. It now does the same thing that Transcoder::decode() above it does, insert a LOSSCHAR and advance the iterator.