This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2337] New: libio in wide mode deallocates user supplied buffer
- From: "Petr dot Salinger at seznam dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 14 Feb 2006 17:05:27 -0000
- Subject: [Bug libc/2337] New: libio in wide mode deallocates user supplied buffer
- Reply-to: sourceware-bugzilla at sourceware dot org
Hello.
Please try to run attached source under "strace -e trace=mmap2,munmap"
At the end there will be something like:
hello.
buf = 0x8049160, fp = 0x804a008, fp+delta = 0x804a04f
munmap(0x804a04f, 4096) = -1 EINVAL (Invalid argument)
On file close libio tries to free buffer, which have not been allocated by libio.
In first case it is internal 1byte buffer, but it can be also user specified buffer,
just compile with -DUSER_BUF. It leads to crashes.
Petr
--
Summary: libio in wide mode deallocates user supplied buffer
Product: glibc
Version: 2.3.6
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: Petr dot Salinger at seznam dot cz
CC: glibc-bugs at sources dot redhat dot com
GCC host triplet: i486-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=2337
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.