View Single Post
Old 01-05-2013, 08:50 AM   #12
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
From the code...
Quote:
static inline void force_dump(void)
{
fprintf(stderr, "\n\033[1m%s\033[0m\n", "Forcing core dump");
fflush(stderr);
raise(SIGSEGV);
exit(1);
}
which is called like:

Quote:
yadayada
fprintf(stderr, " realloc1: usage count is %d: %p @ %s:%d (allocated %s:%d)\n", cnt, p, file, line, ah->file, ah->line);
force_dump();
and

Quote:
void int_error(char *m, ...)
{
va_list l;
free_all_itrms();
va_start(l, m);
sprintf(errbuf, "\033[1mINTERNAL ERROR\033[0m at %s:%d: ", errfile, errline);
strcat(errbuf, m);
er(1, errbuf, l);
force_dump();
}
and 4ish other flavours of handling

so the lines JUST PRECEDING the call to the dump dumper should give the ACTUALLY helpful error message content...

In fact as a general rule just quoting a tiny part of some error without sharing the right parts of it is actually less than useless. It makes the job harder. as you probably know often one error message can be cascaded as a result of previous errors...

http://tucnak2.sourcearchive.com/doc...8c-source.html (or similar - pick your right version) would appear to be good place to look for error handling methodologies within the application.

Hope it helps... FWIW sharing your work "so far" is never a terrible idea if you get stuck.

Last edited by twobob; 01-05-2013 at 08:53 AM.
twobob is offline   Reply With Quote