This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] gcc/reload.c: Initialize several arrays before use them in find_reloads()
- From: Chen Gang S <gang dot chen at sunrus dot com dot cn>
- To: "augustine dot sterling at gmail dot com" <augustine dot sterling at gmail dot com>, Max Filippov <jcmvbkbc at gmail dot com>
- Cc: Jeff Law <law at redhat dot com>, Steven Bosscher <stevenb dot gcc at gmail dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Richard Henderson <rth at redhat dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 25 Feb 2015 08:43:41 +0800
- Subject: Re: [PATCH] gcc/reload.c: Initialize several arrays before use them in find_reloads()
- Authentication-results: sourceware.org; auth=none
- References: <54E99B0E dot 2080109 at sunrus dot com dot cn> <54EBA926 dot 30207 at redhat dot com> <CABu31nPrpNmLQapXcu_XF0S12DKM27eVrTJ9GER=eN6oo=L7VA at mail dot gmail dot com> <54EBB454 dot 9000601 at redhat dot com> <54EBD4ED dot 4080605 at sunrus dot com dot cn> <54EC9ECE dot 8030709 at redhat dot com> <CAMo8BfJKGAvY-JeK0hJiHxeuqm4QWYgH0ON_m-vrGbe2A8v+4A at mail dot gmail dot com> <CAGSvup-juhaQR6s-EVegdbUE7N9T8kg31sD1K=Ys87zHmQEnAw at mail dot gmail dot com>
On 2/25/15 07:36, augustine.sterling@gmail.com wrote:
> On Tue, Feb 24, 2015 at 2:05 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> Hi,
>>
>> On Tue, Feb 24, 2015 at 6:54 PM, Jeff Law <law@redhat.com> wrote:
>>>
>>> You can tackle them in any order you wish. However, I suspect fixing the
>>> xtensa backend may be easier. I don't have any good way to test xtensa, but
>>> something like the attached patch for the xtensa port should be sufficient.
>>
>> I can confirm that this patch fixes the issue. I haven't got a segfault
>> as was reported in bugzilla, but I got some 'conditional jump or move
>> depends on uninitialised value' under valgrind, originated from
>> find_reloads, that the patch fixed. And with it the testcase from
>> bugzilla actually produces code with loop instruction.
>
> Max, the patch doesn't fix the underlying issue, it just hides the bad
> memory reference by initializing what we were already accessing.
>
> See Jeff Law's message earlier in the thread.
>
So we need genrecog to find the underlying issue in time, and report
error (stop building gcc).
And also thank Max very much for his warmhearted response in every where
(kernel, qemu, and gcc). I am sure your response will give much help to
me. :-)
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed