[dovecot-cvs] dovecot/src/lib backtrace-string.c,1.2,1.3
tss at dovecot.org
tss at dovecot.org
Sun Nov 19 13:36:38 UTC 2006
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv27524
Modified Files:
backtrace-string.c
Log Message:
Handle backtrace_symbols() returning NULL without errors (out of memory).
Index: backtrace-string.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/backtrace-string.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- backtrace-string.c 19 Nov 2006 13:30:41 -0000 1.2
+++ backtrace-string.c 19 Nov 2006 13:36:35 -0000 1.3
@@ -26,7 +26,13 @@
for (i = STACK_SKIP_COUNT; i < ret; i++) {
if (i > STACK_SKIP_COUNT)
str_append(str, " -> ");
- str_append(str, strings[i]);
+
+ if (strings != NULL)
+ str_append(str, strings[i]);
+ else {
+ /* out of memory case */
+ str_printfa(str, "0x%p", stack[i]);
+ }
}
free(strings);
return 0;
More information about the dovecot-cvs
mailing list