Lionel Elie Mamane wrote:
It also contains this very suspicious code in
src/System/Misc/fast_alloc.cpp:
void*
safe_malloc (register size_t sz) {
void* ptr= malloc (sz);
if (ptr==NULL) {
cerr << "Fatal error: out of memory\n";
cout << 1/0 << "\n";
exit (1);
}
return ptr;
}
the "cout << " line looks suspicious, probably a local debugging code
that was not meant to be committed? It was introduced with commit log:
Fix bug concerning surroundings of GUI elements
and not e.g. "make sure we die with SIGFPE on out of memory".
I found this crude hack somewhere else in the code as well. It is
supposed to be a way to kill the program with a signal which can be
caught by a debugger. The proper way to do this would be:
abort();
instead of:
cout << 1/0 << "\n";
exit(1);
The standard-C "abort" command is the preferred way to kill the program
with SIGABRT.
_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev