bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

perror bug


From: Eric Blake
Subject: perror bug
Date: Wed, 09 Feb 2011 17:48:57 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

POSIX requires that this program have an identical first and last line:

#include <stdio.h>
#include <string.h>
#include <errno.h>
int main (void) {
  char *err = strerror(1000);
  printf ("%s\n", err);
  errno = 2000;
  perror ("hi");
  printf ("%s\n", err);
  return 0;
}

but on cygwin 1.7.7, the perror() corrupts the buffer returned by
strerror().  We should probably fix that in gnulib as part of our perror
module.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]