public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/2163] New: ioctl() crashes if error value is returned
@ 2006-01-17 11:22 christoph dot stueckjuergen at siemens dot com
  2006-01-17 11:26 ` [Bug libc/2163] " christoph dot stueckjuergen at siemens dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: christoph dot stueckjuergen at siemens dot com @ 2006-01-17 11:22 UTC (permalink / raw)
  To: glibc-bugs

The following code causes SIGSEGV if the ioctl returns an error value:

void test()
{
       int fd = open("/dev/ttyXR3", O_RDWR);
       char dummy[512];
       if (ioctl(fd, TCSETSW, dummy) < 0) {
               printf("hello\n");
       }
}

The problem is that the pointer to the global offset table (gp) is modified and
not correctly restored in the glibc implementation for MIPS64.

-- 
           Summary: ioctl() crashes if error value is returned
           Product: glibc
           Version: 2.3.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: christoph dot stueckjuergen at siemens dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: mips64-linux-gnu


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-02-11 16:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-17 11:22 [Bug libc/2163] New: ioctl() crashes if error value is returned christoph dot stueckjuergen at siemens dot com
2006-01-17 11:26 ` [Bug libc/2163] " christoph dot stueckjuergen at siemens dot com
2006-01-17 11:26 ` christoph dot stueckjuergen at siemens dot com
2006-01-17 13:10 ` aj at suse dot de
2006-01-17 13:40 ` christoph dot stueckjuergen at siemens dot com
2006-01-31 16:26 ` gernot dot hillier at siemens dot com
2006-02-11 16:02 ` aj at suse dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).