This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2163] New: ioctl() crashes if error value is returned
- From: "christoph dot stueckjuergen at siemens dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 17 Jan 2006 11:22:31 -0000
- Subject: [Bug libc/2163] New: ioctl() crashes if error value is returned
- Reply-to: sourceware-bugzilla at sourceware dot org
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.