diff --git a/celt/arch.h b/celt/arch.h index 08b07db59820d2ae5e582a55ebd25107c1142ae7..3845c3a08323f92a7fc5f7dc4c13ee89a1cc04d8 100644 --- a/celt/arch.h +++ b/celt/arch.h @@ -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 diff --git a/silk/typedef.h b/silk/typedef.h index 97b7e709be5bcf1f9f3a63c690644fe560c0d9f8..793d2c0c1d381b838e71e9407e270cda52faa0aa 100644 --- a/silk/typedef.h +++ b/silk/typedef.h @@ -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);}} diff --git a/tests/test_opus_common.h b/tests/test_opus_common.h index 235cf1c101689110a00135bbce2c3a2b51fda0b4..d96c7d84a38ed28c7d5815556fa7601db50300a8 100644 --- a/tests/test_opus_common.h +++ b/tests/test_opus_common.h @@ -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__);