[LLVMbugs] [Bug 10276] New: Problems with zlib
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jul 5 00:22:21 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10276
Summary: Problems with zlib
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: cullmann at absint.de
CC: llvmbugs at cs.uiuc.edu
Hi,
I use zlib 1.2.5 in the following style:
I have a FILE *stream from fopen.
Then I do:
int fileNumber = fileno (stream);
m_gzFile = z_gzdopen (Ur::dup(fileNumber), "rb");
(This is done to allow multiple backends, normally I would read the header
myself from the stream and then choose, but the bug occurs with just that
sequence above)
Now, my program hangs, inside read, always:
read (state=<value optimized out>, buf=<value optimized out>, len=<value
optimized out>, have=<value optimized out>) at /usr/include/bits/unistd.h:37
37 if (__bos0 (__buf) != (size_t) -1)
(gdb) bt
#0 read (state=<value optimized out>, buf=<value optimized out>, len=<value
optimized out>, have=<value optimized out>) at /usr/include/bits/unistd.h:37
#1 gz_load (state=<value optimized out>, buf=<value optimized out>, len=<value
optimized out>, have=<value optimized out>) at
/local/cullmann/build/llvm.default.release/libur/3rdparty/zlib/gzread.c:31
#2 0x00000000004342e2 in gz_avail (state=<value optimized out>) at
/local/cullmann/build/llvm.default.release/libur/3rdparty/zlib/gzread.c:58
#3 0x0000000000433dad in gz_head (state=<value optimized out>) at
/local/cullmann/build/llvm.default.release/libur/3rdparty/zlib/gzread.c:143
#4 0x0000000000433758 in gz_make (state=<value optimized out>) at
/local/cullmann/build/llvm.default.release/libur/3rdparty/zlib/gzread.c:310
#5 0x000000000043361d in z_gzread (file=<value optimized out>, buf=<value
optimized out>, len=Unhandled dwarf expression opcode 0x0
) at
/local/cullmann/build/llvm.default.release/libur/3rdparty/zlib/gzread.c:418
#6 0x0000000000421e27 in Ur::FileStreamInZLib::read (this=<value optimized
out>, data=<value optimized out>, size=<value optimized out>)
at
/local/cullmann/build/llvm.default.release/libur/src/filestream_internal.h:518
#7 0x000000000042020d in Ur::FileStreamIn::read (this=Unhandled dwarf
expression opcode 0x0
) at /local/cullmann/build/llvm.default.release/libur/src/filestream.cpp:225
#8 0x000000000042025a in Ur::FileStreamIn::read (this=Unhandled dwarf
expression opcode 0xef
) at /local/cullmann/build/llvm.default.release/libur/src/filestream.cpp:248
#9 0x000000000041e8c0 in copy_compress_uncompress(char const*, char const*,
Ur::FileStreamOut::CompressionMode) () at
/local/cullmann/build/llvm.default.release/libur/bin/ur-compress.h:60
#10 0x00007ffff7a66eff in __libc_start_main (main=0x41e6a0 <main(int, char**)>,
argc=3, ubp_av=0x7fffffffde38, init=<value optimized out>, fini=<value
optimized out>, rtld_fini=<value optimized out>,
stack_end=0x7fffffffde28) at libc-start.c:226
#11 0x000000000041e5a9 in _start ()
This only occurs with clang/clang++ (without any compiler warnings/errors) but
works perfectly well with GCC (on both linux + macos) and MSVC on win32/64.
Any ideas? Tried to debug this but really see no error.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list