This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix pr61848, linux kernel miscompile


On Thu, Sep 18, 2014 at 10:02:25PM -0600, Jeff Law wrote:
> On 09/16/14 00:03, Alan Modra wrote:
> >gcc testsuite additions?  I decline.  It is too soon.  If you had read
> >my patch submission you'll see that at some stage gcc was supposed to
> >warn on conflicting section attributes, but hasn't done so for a very
> >long time.  There needs to be some agreement on which direction we
> >should go before I'm willing to spend even a small amount of time on
> >the testsuite.
> I think the direction for this ought to be quite clear, warn if we've got
> conflicting section attributes :-)  One could make the argument that if we
> had a test for conflicting section attributes that this code wouldn't have
> bit-rotted so badly.

OK.  That's what I thought too.  Of course, the patch that I submitted
doesn't warn, and gcc has lacked the warning for at least 15 years..

> I think for #1 in your original message, we should be issuing a warning of
> some kind as clearly something isn't right when we've asked for the same
> object to be in two different sections.
> 
> 
> >Also, a test for merging tls model attributes runs
> >into the problem that this can only be done in a target independent
> >way by looking at dumps, and the tls model dump is currently broken.
> Target independent tests are always best, but pulling together one that is
> specific to a target is usually still good enough.  Especially if it's an
> x86 target given how often those are tested by the developer community as a
> whole.
> 
> I think for #1 in your posting, verifying that we issue the proper warning
> should be sufficient.  Use the dg framework test and this marker:
> 
> /* { dg-require-named-sections } */

Thanks!  That helps, and I see someone has attached a testcase to the
bugzilla in an attempt to move this forward.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61848#c18

I'll be happy if someone else takes over the bugzilla.  I've been on
vacation, and should spend time over the next few weeks on the
binutils 2.25 release rather than trying to push gcc patches.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]