mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 08:18:51 -05:00
mcheck() seems to cause segfaults. Annoying. Switched back to useing mtrace() - if anything valgrind is superior to mcheck anyway
This commit is contained in:
parent
3e608e7e85
commit
2d3a707a05
@ -85,32 +85,6 @@ unsigned int maxcols = 80;
|
||||
|
||||
extern int neednl;
|
||||
|
||||
#if defined(PACMAN_DEBUG) && !defined(CYGWIN) && !defined(BSD)
|
||||
void mcheck_abort(enum mcheck_status status)
|
||||
{
|
||||
switch(status)
|
||||
{
|
||||
case MCHECK_DISABLED:
|
||||
fputs("mcheck: disabled, no checking can be done\n", stderr);
|
||||
break;
|
||||
case MCHECK_OK:
|
||||
fputs("mcheck: block ok", stderr);
|
||||
break;
|
||||
case MCHECK_HEAD:
|
||||
fputs("mcheck: inconsistancy at block head (underrun)\n", stderr);
|
||||
abort();
|
||||
break;
|
||||
case MCHECK_TAIL:
|
||||
fputs("mcheck: inconsistancy at block tail (overrun)\n", stderr);
|
||||
abort();
|
||||
break;
|
||||
case MCHECK_FREE:
|
||||
fputs("mcheck: block has already been freed\n", stderr);
|
||||
break;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Display usage/syntax for the specified operation.
|
||||
* op: the operation code requested
|
||||
* myname: basename(argv[0])
|
||||
@ -437,7 +411,11 @@ int main(int argc, char *argv[])
|
||||
list_t *lp;
|
||||
|
||||
#if defined(PACMAN_DEBUG) && !defined(CYGWIN) && !defined(BSD)
|
||||
mcheck(mcheck_abort);
|
||||
char *malloc_trace = (char *)getenv("MALLOC_TRACE");
|
||||
if(!malloc_trace) {
|
||||
setenv("MALLOC_TRACE=pacman.mtrace");
|
||||
}
|
||||
mtrace();
|
||||
#endif
|
||||
cenv = getenv("COLUMNS");
|
||||
if(cenv != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user