mirror of https://github.com/macssh/macssh.git
trap __msl_assertion_failed
This commit is contained in:
parent
8af171dbb5
commit
68013734f9
|
@ -262,6 +262,22 @@ void __assertion_failed(char const *condition, char const *filename, int lineno)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* __msl_assertion_failed
|
||||
*/
|
||||
void __msl_assertion_failed(char const *condition, char const *filename, char const *funcname, int lineno)
|
||||
{
|
||||
fprintf(stderr, "Assertion (%s) failed in \"%s\" on line %d\n", condition, filename, lineno);
|
||||
if ( pthread_getspecific(ssh2threadkey) ) {
|
||||
abort();
|
||||
} else {
|
||||
#undef abort
|
||||
abort();
|
||||
#define abort macosabort
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* strsignal
|
||||
*/
|
||||
|
|
|
@ -448,7 +448,7 @@ void abort(void)
|
|||
*/
|
||||
void __assertion_failed(char const *condition, char const *filename, int lineno)
|
||||
{
|
||||
Debugger();
|
||||
//Debugger();
|
||||
|
||||
fprintf( stderr, "Assertion (%s) failed in \"%s\" on line %d\n", condition, filename, lineno );
|
||||
|
||||
|
@ -461,6 +461,24 @@ void __assertion_failed(char const *condition, char const *filename, int lineno)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* __msl_assertion_failed
|
||||
*/
|
||||
void __msl_assertion_failed(char const *condition, char const *filename, char const *funcname, int lineno)
|
||||
{
|
||||
//Debugger();
|
||||
|
||||
fprintf(stderr, "Assertion (%s) failed in \"%s\" on line %d\n", condition, filename, lineno);
|
||||
|
||||
if ( pthread_getspecific(ssh2threadkey) ) {
|
||||
macosabort();
|
||||
} else {
|
||||
#undef abort
|
||||
abort();
|
||||
#define abort macosabort
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* lshmalloc
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue