<div dir="ltr">In the meanwhile, were you able to talk with the implementer about your proposed change, Erich?  If you and the implementer agree on your fix, maybe I can add it to my source and get going on my work.<br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 4, 2017 at 11:25 AM Keane, Erich <<a href="mailto:erich.keane@intel.com">erich.keane@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well Blarg, that is disappointing.  In THIS case, I at least have a hope, the original implementer and I share an organization, so hopefully he'll be willing to fix it out of internal good will :)<br class="gmail_msg">
<br class="gmail_msg">
-----Original Message-----<br class="gmail_msg">
From: Dr D. Chisnall [mailto:<a href="mailto:dc552@hermes.cam.ac.uk" class="gmail_msg" target="_blank">dc552@hermes.cam.ac.uk</a>] On Behalf Of David Chisnall<br class="gmail_msg">
Sent: Tuesday, April 4, 2017 1:01 AM<br class="gmail_msg">
To: Keane, Erich <<a href="mailto:erich.keane@intel.com" class="gmail_msg" target="_blank">erich.keane@intel.com</a>><br class="gmail_msg">
Cc: <a href="mailto:cfe-dev@lists.llvm.org" class="gmail_msg" target="_blank">cfe-dev@lists.llvm.org</a>; <a href="mailto:derrick.mckee@gmail.com" class="gmail_msg" target="_blank">derrick.mckee@gmail.com</a>; <a href="mailto:jonathan@codesourcery.com" class="gmail_msg" target="_blank">jonathan@codesourcery.com</a>; <a href="mailto:csong@cs.ucr.edu" class="gmail_msg" target="_blank">csong@cs.ucr.edu</a><br class="gmail_msg">
Subject: Re: [cfe-dev] Clang incorrectly optimizing out for conditional in Linux<br class="gmail_msg">
<br class="gmail_msg">
On 3 Apr 2017, at 20:24, Keane, Erich via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="gmail_msg" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> I filed an issue with the Kernel (here <a href="https://bugzilla.kernel.org/show_bug.cgi?id=195235" rel="noreferrer" class="gmail_msg" target="_blank">https://bugzilla.kernel.org/show_bug.cgi?id=195235</a>) to capture this issue.  Hopefully this is something that they will fix!  I'll note that my suggested answer assumes they want the behavior to remain the same, though I'm not sure that is what they MEANT.<br class="gmail_msg">
<br class="gmail_msg">
As I recall, this particular kernel idiom is one that caused GCC to add an extra flag to restrict their optimisations, because rewriting Linux in C was harder than hacking the compiler to support Linux-flavoured almost-C, so I wouldn’t hold out much hope for Linux fixing the code - this is far from the only place that this idiom occurs and has been the cause of at least one security vulnerability.<br class="gmail_msg">
<br class="gmail_msg">
David<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">Derrick McKee<br>Ph.D. Student at Purdue University</div></div>