This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Do we care about malloc failure in tests?


On 06/06/2016 03:54 AM, Mike Frysinger wrote:
On 05 Jun 2016 17:39, Paul Pluzhnikov wrote:
+static void
+oom_error (const char *fn)
+{
+  fprintf (stderr, "Out of memory in %s\n", fn);

use printf as we don't let test write to stderr anymore

might want to tweak the printf like so:
  printf ("%s: allocation failed: %m\n", fn);

Perhaps also include the request allocation size as well.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]