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

* [Bug libc/2163] ioctl() crashes if error value is returned
  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
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: christoph dot stueckjuergen at siemens dot com @ 2006-01-17 11:26 UTC (permalink / raw)
  To: glibc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   GCC host triplet|x86_64-linux-gnu            |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

* [Bug libc/2163] ioctl() crashes if error value is returned
  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 ` christoph dot stueckjuergen at siemens dot com
  2006-01-17 11:26 ` christoph dot stueckjuergen at siemens dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: christoph dot stueckjuergen at siemens dot com @ 2006-01-17 11:26 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From christoph dot stueckjuergen at siemens dot com  2006-01-17 11:26 -------
Created an attachment (id=836)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=836&action=view)
proposed patch for fixing the ioctl() problem for MIPS64 glibc


-- 


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

* [Bug libc/2163] ioctl() crashes if error value is returned
  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
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: aj at suse dot de @ 2006-01-17 13:10 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From aj at suse dot de  2006-01-17 13:10 -------
The current code in glibc CVS has:

L(error):
	SETUP_GP64 (a0, __ioctl)
	PTR_LA t9, __syscall_error
	RESTORE_GP64
	jr t9

I'll check this later...

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|drepper at redhat dot com   |aj at suse dot de
             Status|NEW                         |ASSIGNED


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

* [Bug libc/2163] ioctl() crashes if error value is returned
  2006-01-17 11:22 [Bug libc/2163] New: ioctl() crashes if error value is returned christoph dot stueckjuergen at siemens dot com
                   ` (2 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: christoph dot stueckjuergen at siemens dot com @ 2006-01-17 13:40 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From christoph dot stueckjuergen at siemens dot com  2006-01-17 13:40 -------
Subject: Re:  ioctl() crashes if error value is returned

I see...  
 
RESTORE_GP64 is #defined as .cpreturn. So it looks like it's already fixed in 
the current version. 


-- 


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

* [Bug libc/2163] ioctl() crashes if error value is returned
  2006-01-17 11:22 [Bug libc/2163] New: ioctl() crashes if error value is returned christoph dot stueckjuergen at siemens dot com
                   ` (3 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: gernot dot hillier at siemens dot com @ 2006-01-31 16:26 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From gernot dot hillier at siemens dot com  2006-01-31 16:26 -------
See also bug 933. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gernot dot hillier at
                   |                            |siemens dot com


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

* [Bug libc/2163] ioctl() crashes if error value is returned
  2006-01-17 11:22 [Bug libc/2163] New: ioctl() crashes if error value is returned christoph dot stueckjuergen at siemens dot com
                   ` (4 preceding siblings ...)
  2006-01-31 16:26 ` gernot dot hillier at siemens dot com
@ 2006-02-11 16:02 ` aj at suse dot de
  5 siblings, 0 replies; 7+ messages in thread
From: aj at suse dot de @ 2006-02-11 16:02 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From aj at suse dot de  2006-02-11 16:01 -------
Ok, let's close it as fixed for 2.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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).