Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 288905 - Stabilize games-util/dzip-2.9-r2
Summary: Stabilize games-util/dzip-2.9-r2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Hanno Böck
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2009-10-13 16:46 UTC by Mr. Bones. (RETIRED)
Modified: 2010-01-22 20:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fixing segfault (dzip-2.9-system-zlib.diff,884 bytes, patch)
2010-01-17 15:19 UTC, Kacper Kowalik (Xarthisius) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mr. Bones. (RETIRED) gentoo-dev 2009-10-13 16:46:03 UTC
Please mark dzip-2.9-r2.ebuild stable.
Comment 1 Markus Meier gentoo-dev 2009-11-21 18:08:19 UTC
this is a regression...

$ dzip test.txt -o test.dz
*** glibc detected *** dzip: malloc(): memory corruption: 0x083aa3b8 ***
======= Backtrace: =========
/lib/libc.so.6[0xf7631fc4]
/lib/libc.so.6[0xf7634896]
/lib/libc.so.6(__libc_malloc+0x5a)[0xf763677a]
dzip[0x8050ee2]
dzip[0x8050f12]
/lib/libz.so.1(deflateInit2_+0x1fe)[0xf771459e]
/lib/libz.so.1(deflateInit_+0x52)[0xf77146c2]
dzip[0x8049a98]
dzip[0x8049d3f]
dzip[0x8050c0f]
dzip[0x8051736]
/lib/libc.so.6(__libc_start_main+0xe5)[0xf75dca65]
dzip[0x8049061]
======= Memory map: ========
08048000-08053000 r-xp 00000000 fe:07 132453                             /usr/games/bin/dzip
08053000-08054000 r--p 0000a000 fe:07 132453                             /usr/games/bin/dzip
08054000-08055000 rw-p 0000b000 fe:07 132453                             /usr/games/bin/dzip
08055000-08077000 rw-p 00000000 00:00 0 
08392000-083cb000 rw-p 00000000 00:00 0                                  [heap]
f7400000-f7421000 rw-p 00000000 00:00 0 
f7421000-f7500000 ---p 00000000 00:00 0 
f75c5000-f75c6000 rw-p 00000000 00:00 0 
f75c6000-f7708000 r-xp 00000000 fe:07 465741                             /lib/libc-2.10.1.so
f7708000-f770a000 r--p 00142000 fe:07 465741                             /lib/libc-2.10.1.so
f770a000-f770b000 rw-p 00144000 fe:07 465741                             /lib/libc-2.10.1.so
f770b000-f770e000 rw-p 00000000 00:00 0 
f770e000-f7720000 r-xp 00000000 fe:07 55963                              /lib/libz.so.1.2.3
f7720000-f7721000 r--p 00011000 fe:07 55963                              /lib/libz.so.1.2.3
f7721000-f7722000 rw-p 00012000 fe:07 55963                              /lib/libz.so.1.2.3
f7722000-f7723000 rw-p 00000000 00:00 0 
f7758000-f7764000 r-xp 00000000 fe:07 914816                             /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1
f7764000-f7765000 r--p 0000b000 fe:07 914816                             /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1
f7765000-f7766000 rw-p 0000c000 fe:07 914816                             /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1
f7766000-f7767000 rw-p 00000000 00:00 0 
f7767000-f7783000 r-xp 00000000 fe:07 464836                             /lib/ld-2.10.1.so
f7783000-f7784000 r--p 0001c000 fe:07 464836                             /lib/ld-2.10.1.so
f7784000-f7785000 rw-p 0001d000 fe:07 464836                             /lib/ld-2.10.1.so
ffc31000-ffc47000 rw-p 00000000 00:00 0                                  [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0                                  [vdso]
Aborted
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2010-01-05 09:13:46 UTC
works fine for me on stable x86.
Comment 3 Christian Faulhammer (RETIRED) gentoo-dev 2010-01-05 11:02:06 UTC
Which Glibc version are you two using?  I can reproduce the failure and I have Glibc 2.10 (for testing).
Comment 4 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-01-17 15:19:54 UTC
Created attachment 216738 [details, diff]
fixing segfault

I don't think it has anything to do with glibc, rather zlib version. 
Package had bundled version of zlib which defined:

typedef voidpf (*alloc_func) OF((uInt size));
typedef void   (*free_func)  OF((voidpf address));

while on system zlib we have:

typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
typedef void   (*free_func)  OF((voidpf opaque, voidpf address));

There two options:
 1) Use default functions from zlib lib i.e. pass Z_NULL to both functions (see patch)
 2) Rewrite Dzip_calloc function in conmain.c.
Comment 5 Mr. Bones. (RETIRED) gentoo-dev 2010-01-20 19:30:05 UTC
I masked it for removal.
Comment 6 Hanno Böck gentoo-dev 2010-01-20 21:44:50 UTC
I'll take it
Comment 7 Hanno Böck gentoo-dev 2010-01-22 20:14:11 UTC
Added -r3, also fixed crc32 on amd64. Will request x86/amd64 stabilization after 30 days period so we can kill the old broken versions.

I also cleaned the ebuild up a bit and didn't use the games eclass any more. It's just an archiver, nothing really related to games (the only reason it probably landed there is that it was developed from a gaming-related website).