This is the mail archive of the glibc-bugs@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]

[Bug libc/12874] New: Wrong assumption in sysdeps/wordsize-64/tst-writev.c


http://sourceware.org/bugzilla/show_bug.cgi?id=12874

           Summary: Wrong assumption in sysdeps/wordsize-64/tst-writev.c
           Product: glibc
           Version: 2.14
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: hjl.tools@gmail.com


sysdeps/wordsize-64/tst-writev.c has

/* writev() should report that it has written EXPECTED number of bytes.  */
#define EXPECTED ((size_t) INT32_MAX + 1)
...
 /* Write junk to /dev/null with the writev syscall in order to get a return
     of INT32_MAX+1 bytes to verify that the INTERNAL_SYSCALL wrappers aren't
     mangling the result if the signbit of a 32-bit number is set.  */
  ssize_t ret = writev (fd, iv, IOV_MAX);

  free (iv[0].iov_base);
  close (fd);

  if (ret != (ssize_t) EXPECTED)
    {
      printf ("writev() return value: %zd != EXPECTED: %zd\n", ret, EXPECTED);
      return 1;
    }

But kernel 2.6.38 has imposed a limit of (currently) 2 GiB-one page
for an individual I/O in order to avoid certain classes of security
problems.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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