It seems that this problem is specific to the gcc-2.96 compiler
that comes with redhat-7.x distros. I just tried compiling
ecasound with gcc-2.96-100 and then running 'make check'
in ecasound/libecasound. It crashes at random points almost on every
run, and always inside the libstdc++ (ie. the C++ standard library).
My current best guess is that gcc-2.96 simply miscompiles ecasound
or there is a serious resource management problem in the libstdc++
version that is shipped with 2.96-100.

If you have some version of gcc-2.96 installed, could you try the test
I've described above. You should run 'make check' at least a few times.

Previously I was using egcs-1.12 (also known as gcc-2.91.66) and
never saw this type of problems. Also, I'm now using gcc-3.2, and
it also works fine.

>> The problem is that in all the bug scenarios I've traced, ecasound doesn't
>> really do anything wrong. The libstdc++ just crashes... :(
> In other words, C++ is not only heavily complicated, but also
> unstable. wow :).

Well, these kinds of seemingly random errors are actually quite
rare. But I admit that C++ is far from an ideal language.
Complex language and libraries, lack of standard ABI, lack of
standard compliant compilers and runtimes, slow compilation, ...
and the list goes on.

But still, C++ has a few qualities that are really difficult to beat: 1)
it doesn't hide anything from the programmer (you can go as low-level as
you like if you need -> this is extremely important for programs like
ecasound), 2) there's no hidden overhead, 3) many features that help
large-scale development (OO, generic programming, namespaces) and 4) C++
standard covers most of the little things that are missing from C (string
handling, lists, vectors, associative maps and so forth).

I've written non-trivial programs in for instance C, Eiffel, Java and
Python, so I'm not a C++-only man. :) But when it comes to ecasound, I
couldn't imagine using anything else than C++. C is possibly the best
alternative, but that would require so much more code that I'm not sure
whether I could maintain it all by myself.