From: Mike Frysinger <vapier@gentoo.org>
To: linux-parisc@vger.kernel.org
Subject: bad code with gcc-4.3 and lzma-utils ?
Date: Sat, 3 Jan 2009 07:45:01 -0500 [thread overview]
Message-ID: <200901030745.01638.vapier@gentoo.org> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2632 bytes --]
if you build lzma-4.32.7 with gcc-4.3 and -march=2.0, then lzma segfaults when
trying to do anything useful. gcc-4.1 has no problem here.
to reproduce, just download lzma-4.32.7.tar.gz and do:
tar xf lzma-4.32.7.tar.gz
cd lzma-4.32.7
CXXFLAGS='-O1 -march=2.0 -g' ./configure
make
make check
Guy Martin narrowed it down to the code in src/sdk/7zip/Compress/LZMA/ ... if
we build the encoder/decoder without -march=2.0, then the tests pass and life
is peachy. with a little bit of patience, i think i narrowed down a bit
further to the function CDecoder::SetDecoderProperties2(). we can build the
rest of the file with -march=2.0, but when we build this function with -
march=2.0, then it craps out. the code in question has a bit of funky casting
from a byte array up to uint32's, but i dont think this is an alignment issue.
i'm attaching the preprocessed file which can then be compared:
g++ -O1 -c LZMADecoder.i -march=2.0 -o LZMADecoder.bad.o
g++ -O1 -c LZMADecoder.i -o LZMADecoder.good.o
the kernel logs the fault like so:
do_page_fault() pid=15903 command='lzma' type=15 address=0x00000063
YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
PSW: 00000000000001000000000000001111 Not tainted
r00-03 0004000f 0001b800 0001c217 00000005
r04-07 000320e8 00356e06 00000019 00040000
r08-11 000320b0 fb12c810 fb12c6c4 00000000
r12-15 fb12c6c0 00000000 00030790 fb12c010
r16-19 00030794 00029d74 0002a8a8 00000063
r20-23 00000000 00000400 00000003 fb12c9c8
r24-27 00100000 4008f008 00000003 0002fcbc
r28-31 00000060 00000000 fb12c980 00000000
sr00-03 00000006 00000000 00000000 00000006
sr04-07 00000006 00000006 00000006 00000006
VZOUICununcqcqcqcqcqcrmunTDVZOUI
FPSR: 00000000000000000000000000000000
FPER1: 00000000
fr00-03 0000000000000000 0000000000000000 0000000000000000 0000000000000000
fr04-07 1267d000cfed0968 00000020101683f0 106238101061f810 bff0000000000000
fr08-11 fffff0001267d000 0000000200000003 0000000012729840 ffffff9c00000002
fr12-15 fb6ab02c00000001 000cc542101737c8 10101a281061f810 126840883b9aca00
fr16-19 104aed9c106238a8 fffffff412684208 105902f6105902f7 000000000000000b
fr20-23 1055d8100000000f 1055d810101687b4 0000000800000002 00001c2c00000000
fr24-27 0000000000000000 000000004ccd4eed fce2fc640b19f33d 8c4f289cb1314a9a
fr28-31 0701fb1163036696 8a9012eac57c0709 0701fb1100000228 0a4ed1f910111908
IASQ: 00000006 00000006 IAOQ: 0001b9f3 0001b9f7
IIR: 0e751280 ISR: 00000006 IOR: 00000063
CPU: 0 CR30: 93704000 CR31: 10600000
ORIG_R28: 00000000
IAOQ[0]: 0x1b9f0
IAOQ[1]: 0x1b9f4
RP(r2): 0x1c214
-mike
[-- Attachment #1.2: LZMADecoder.i.bz2 --]
[-- Type: application/x-bzip, Size: 9475 bytes --]
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 835 bytes --]
next reply other threads:[~2009-01-03 12:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-03 12:45 Mike Frysinger [this message]
2009-01-03 13:40 ` bad code with gcc-4.3 and lzma-utils ? Matthew Wilcox
2009-01-03 17:21 ` John David Anglin
2009-01-04 12:08 ` Guy Martin
2009-01-04 16:41 ` John David Anglin
2009-01-04 18:21 ` John David Anglin
2009-01-04 20:16 ` John David Anglin
2009-01-04 23:21 ` Guy Martin
2009-01-04 23:26 ` John David Anglin
2009-01-04 23:42 ` John David Anglin
2009-01-05 9:54 ` Guy Martin
2009-01-06 4:40 ` John David Anglin
2009-01-06 6:16 ` Mike Frysinger
2009-01-06 14:35 ` John David Anglin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200901030745.01638.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=linux-parisc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox