[compiler-rt] Fixing Linux compile error due to use of clone

Sergey Matveev earthdok at google.com
Thu Jul 11 09:39:31 PDT 2013


Committed your patch as r186103


On Thu, Jul 11, 2013 at 8:18 PM, Andy Jost <Andrew.Jost at synopsys.com> wrote:

>  I should also mention that the system in question, is not **that** old.
> It was brand-new in 2009.****
>
> ** **
>
> I don’t know much about the Linux kernel, but uname –r reports
> “2.6.9-89.ELlargesmp”.****
>
> ** **
>
> I don’t know how that relates to “Linux version 2.4,” but I can see from
> the definition of clone in /usr/include/bits/sched.h that the extra three
> arguments are not accepted.  ****
>
> ** **
>
> -Andy****
>
> ** **
>
> *From:* Andy Jost
> *Sent:* Thursday, July 11, 2013 9:13 AM
> *To:* Alexey Samsonov; Andy Jost
> *Cc:* Reid Kleckner; llvm-commits at cs.uiuc.edu
> *Subject:* RE: [compiler-rt] Fixing Linux compile error due to use of
> clone****
>
> ** **
>
> I’m using autoconf.****
>
> ** **
>
> *From:* Alexey Samsonov [mailto:samsonov at google.com]
> *Sent:* Thursday, July 11, 2013 7:20 AM
> *To:* Andy Jost
> *Cc:* Reid Kleckner; llvm-commits at cs.uiuc.edu
> *Subject:* Re: [compiler-rt] Fixing Linux compile error due to use of
> clone****
>
> ** **
>
> On Thu, Jul 11, 2013 at 8:03 AM, Andy Jost <Andrew.Jost at synopsys.com>
> wrote:****
>
>   > I'd honestly be surprised if the sanitizers work at all on Linux 2.4
> with just this change****
>
>  ****
>
> That may be, but I don’t need the sanitizer and this change is required
> just to make compiler-rt. ****
>
>    ****
>
> How do I check if this was committed?****
>
>  ****
>
> -Andy****
>
>  ****
>
> *From:* Reid Kleckner [mailto:rnk at google.com]
> *Sent:* Wednesday, July 10, 2013 3:49 PM
> *To:* Andy Jost
> *Cc:* llvm-commits at cs.uiuc.edu
> *Subject:* Re: [compiler-rt] Fixing Linux compile error due to use of
> clone****
>
>  ****
>
> This change is probably fine.  I think those args are only accessed if
> certain flags are set.****
>
> That said, I'd honestly be surprised if the sanitizers work at all on
> Linux 2.4 with just this change.  I doubt anyone is testing it.****
>
>  ** **
>
> I think we should just disable building all the sanitizers on old Linux
> kernels. ****
>
> ** **
>
> Andy, what build system do you use (CMake or autoconf/make)?****
>
>     ****
>
> On Wed, Jul 10, 2013 at 6:33 PM, Andy Jost <Andrew.Jost at synopsys.com>
> wrote:****
>
> First post to llvm-commits, so I may not know the process.  I’m hoping
> someone will review and submit this for me.****
>
>  ****
>
> The attached patch fixes an unsafe use of clone in
> projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc.
> ****
>
>  ****
>
> From the clone man page:****
>
> In Linux 2.4 and earlier, clone() does not take arguments ptid, tls, and
> ctid. ** **
>
>  ****
>
> Those last three arguments are unused in this case, anyway, so I just
> removed them.  This fixes the build of compiler-rt on my machine. ****
>
>  ****
>
> Is a testcase needed?  If so, where should I look to get started?****
>
>  ****
>
> -Andy****
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits****
>
>  ****
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits****
>
>
>
> ****
>
> ** **
>
> -- ****
>
> Alexey Samsonov, MSK****
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130711/481c6606/attachment.html>


More information about the llvm-commits mailing list