This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/1377] seg fault inside getwc() when using LD_PRELOADed code
- From: "kkylheku at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 13 Nov 2009 00:25:21 -0000
- Subject: [Bug libc/1377] seg fault inside getwc() when using LD_PRELOADed code
- References: <20050923220934.1377.manuelarriaga@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From kkylheku at gmail dot com 2009-11-13 00:25 -------
(In reply to comment #3)
> I'm going to try the workaround of implementing popen from scratch, so that
> the stream is then just created with fdopen.
There is a much simpler workaround which may work well for some applications,
like mine, which have already wrapped streams in an object that can be
extended with extra context info.
The recipe is: Create the FILE * command stream with popen. Then pull out the
file descriptor with fileno, duplicate it with dup, and use fdopen to create a
new FILE * descriptor on the duplicate. Then use the new FILE * in place of
the old for I/O operations. Keep the original handle in order to call pclose,
to collect the process exit status.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=1377
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.