[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52]
From: |
Andrew Makhorin |
Subject: |
Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52] |
Date: |
Thu, 28 Nov 2013 18:28:10 +0400 |
> I further bisected the issue and found that the problem appears
> between GLPK versions 4.50 and 4.51:
In 4.51 I replaced zlib 1.2.5 with zlib 1.2.7; probably something is
wrong with zlib 1.2.7 on 64-bit platform (see below).
Could you please remove subdirectory glpk-4.52/src/zlib, copy there
subdirectory glpk-4.50/src/zlib, and then build glpk 4.52 from scratch?
I think the bug should disappear (since you report that 4.50 works
fine). Thank you.
Andrew Makhorin
> >>> Reading problem data from `greenbea.gz'...
> >>> ==28394== Invalid read of size 8
> >>> ==28394== at 0x4EE393C: zlib_crc32 (crc32.c:259)
Here crc32.c attempts to read data from crc_table via DOLIT32 defined as
follows:
#define DOLIT4 c ^= *buf4++; \
c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4;
DOLIT4
The statement 'c ^= *buf4++;' is not portable, because c is declared as
a 32-bit int while buf4 is a pointer.
> >>> ==28394== by 0x4EEA819: zlib_inflate (inflate.c:1232)
> >>> ==28394== by 0x4EE791F: gz_decomp (gzread.c:189)
> >>> ==28394== by 0x4EE7AE5: gz_fetch (gzread.c:245)
> >>> ==28394== by 0x4EE7CB7: zlib_gzread (gzread.c:339)
> >>> ==28394== by 0x4EE7DD2: zlib_gzgetc (gzread.c:398)
> >>> ==28394== by 0x4E61494: _glp_lib_xfgetc (glpenv07.c:580)
> >>> ==28394== by 0x4E9F70E: read_char (glpmps.c:167)
> >>> ==28394== by 0x4E9FCC2: indicator (glpmps.c:214)
> >>> ==28394== by 0x4EA0170: glp_read_mps (glpmps.c:395)
> >>> ==28394== by 0x400767: main (in /home/carlo/tmp/glpktst)
> >>> ==28394== Address 0x6aeb39f4b68 is not stack'd, malloc'd or
> >>> (recently) free'd
> >>> ==28394==
> >>> ==28394==
> >>> ==28394== Process terminating with default action of signal 11
> >>> (SIGSEGV)
- [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52], Andrew Makhorin, 2013/11/27
- Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52], Raniere Silva, 2013/11/27
- Message not available
- Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52], Carlo Baldassi, 2013/11/28
- Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52], Andrew Makhorin, 2013/11/28
- Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52], Carlo Baldassi, 2013/11/28
- Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52], Carlo Baldassi, 2013/11/28
- Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52],
Andrew Makhorin <=
- Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52], Heinrich Schuchardt, 2013/11/28
- Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52], Andrew Makhorin, 2013/11/28
- Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52], Carlo Baldassi, 2013/11/28
- Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52], Andrew Makhorin, 2013/11/28
- Re: [Bug-glpk] [Fwd: segfault reading a compressed mps file in 4.52], Carlo Baldassi, 2013/11/28