summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/memory.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/memory.c b/tests/memory.c
index c97e26632..99c768087 100644
--- a/tests/memory.c
+++ b/tests/memory.c
@@ -72,6 +72,7 @@ mpfr_default_allocate (size_t size)
fprintf (stderr, "[MPFR] mpfr_default_allocate(): "
"can't allocate memory (size=%" MPFR_INTMAX_FSPEC "u)\n",
(mpfr_uintmax_t) size);
+ fflush (NULL);
abort ();
}
return ret;
@@ -88,6 +89,7 @@ mpfr_default_reallocate (void *oldptr, size_t old_size, size_t new_size)
"can't reallocate memory (old_size=%" MPFR_INTMAX_FSPEC
"u new_size=%" MPFR_INTMAX_FSPEC "u)\n",
(mpfr_uintmax_t) old_size, (mpfr_uintmax_t) new_size);
+ fflush (NULL);
abort ();
}
return ret;
@@ -134,6 +136,7 @@ tests_addsize (size_t size)
fprintf (stderr, "[MPFR] tests_addsize(): "
"too much memory (%" MPFR_INTMAX_FSPEC "u bytes)\n",
(mpfr_uintmax_t) tests_total_size);
+ fflush (NULL);
abort ();
}
}
@@ -149,6 +152,7 @@ tests_allocate (size_t size)
{
fprintf (stderr, "[MPFR] tests_allocate(): "
"attempt to allocate 0 bytes\n");
+ fflush (NULL);
abort ();
}
@@ -182,6 +186,7 @@ tests_reallocate (void *ptr, size_t old_size, size_t new_size)
fprintf (stderr, "[MPFR] tests_reallocate(): "
"attempt to reallocate 0x%" MPFR_INTMAX_FSPEC "X to 0 bytes\n",
(mpfr_uintmax_t) (uintptr_t) ptr);
+ fflush (NULL);
abort ();
}
@@ -191,6 +196,7 @@ tests_reallocate (void *ptr, size_t old_size, size_t new_size)
fprintf (stderr, "[MPFR] tests_reallocate(): "
"attempt to reallocate bad pointer 0x%" MPFR_INTMAX_FSPEC "X\n",
(mpfr_uintmax_t) (uintptr_t) ptr);
+ fflush (NULL);
abort ();
}
h = *hp;
@@ -203,6 +209,7 @@ tests_reallocate (void *ptr, size_t old_size, size_t new_size)
"bad old size %" MPFR_INTMAX_FSPEC
"u, should be %" MPFR_INTMAX_FSPEC "u\n",
(mpfr_uintmax_t) old_size, (mpfr_uintmax_t) h->size);
+ fflush (NULL);
abort ();
}
@@ -226,6 +233,7 @@ tests_free_find (void *ptr)
fprintf (stderr, "[MPFR] tests_free(): "
"attempt to free bad pointer 0x%" MPFR_INTMAX_FSPEC "X\n",
(mpfr_uintmax_t) (uintptr_t) ptr);
+ fflush (NULL);
abort ();
}
return hp;
@@ -261,6 +269,7 @@ tests_free (void *ptr, size_t size)
fprintf (stderr, "[MPFR] tests_free(): bad size %"
MPFR_INTMAX_FSPEC "u, should be %" MPFR_INTMAX_FSPEC "u\n",
(mpfr_uintmax_t) size, (mpfr_uintmax_t) h->size);
+ fflush (NULL);
abort ();
}
@@ -302,6 +311,7 @@ tests_memory_end (void)
count++;
fprintf (stderr, "[MPFR] %u blocks remaining\n", count);
+ fflush (NULL);
abort ();
}
}