Disable message box when calling abort(). The message box is causing hangs in tests.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
This commit is contained in:
parent
f014317fb1
commit
fe00017a06
3 changed files with 9 additions and 0 deletions
|
@ -73,6 +73,9 @@ __attribute__((noreturn))
|
|||
void celt_fatal(const char *str, const char *file, int line)
|
||||
{
|
||||
fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str);
|
||||
#if defined(_MSC_VER)
|
||||
_set_abort_behavior( 0, _WRITE_ABORT_MSG);
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -67,6 +67,9 @@ __attribute__((noreturn))
|
|||
static OPUS_INLINE void _silk_fatal(const char *str, const char *file, int line)
|
||||
{
|
||||
fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str);
|
||||
#if defined(_MSC_VER)
|
||||
_set_abort_behavior( 0, _WRITE_ABORT_MSG);
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
# define silk_assert(COND) {if (!(COND)) {silk_fatal("assertion failed: " #COND);}}
|
||||
|
|
|
@ -75,6 +75,9 @@ static OPUS_INLINE void _test_failed(const char *file, int line)
|
|||
fprintf(stderr,"Please report this failure and include\n");
|
||||
fprintf(stderr,"'make check SEED=%u fails %s at line %d for %s'\n",iseed,file,line,opus_get_version_string());
|
||||
fprintf(stderr,"and any relevant details about your system.\n\n");
|
||||
#if defined(_MSC_VER)
|
||||
_set_abort_behavior( 0, _WRITE_ABORT_MSG);
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
#define test_failed() _test_failed(__FILE__, __LINE__);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue