[llvm-commits] [compiler-rt] r150381 - /compiler-rt/trunk/lib/asan/tests/asan_test.cc
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Tue Feb 14 09:33:44 PST 2012
Yes, it a bug in the header - missing noreturn attribute.
On Feb 13, 2012 8:33 PM, "David Blaikie" <dblaikie at gmail.com> wrote:
> On Mon, Feb 13, 2012 at 4:36 AM, Evgeniy Stepanov
> <eugeni.stepanov at gmail.com> wrote:
> > Author: eugenis
> > Date: Mon Feb 13 06:36:44 2012
> > New Revision: 150381
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=150381&view=rev
> > Log:
> > [asan] Add a missing return.
> >
> > It is technically reachable on Android, where pthread_exit is not
> > marked noreturn.
>
> due to a bug in the header (ie: it should be annotated as noreturn but
> isn't) or a difference in behavior?
>
> llvm_unreachable might be a nicer choice if it's still, really
> unreachable but some libraries inhibit the proof of that property. (I
> mention this because the return you added is the sort of thing that
> Clang's -Wunreachable-code warning would flag in the case where
> pthread_exit is a noreturn function)
>
> - David
>
> >
> > Modified:
> > compiler-rt/trunk/lib/asan/tests/asan_test.cc
> >
> > Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=150381&r1=150380&r2=150381&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
> > +++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Mon Feb 13 06:36:44
> 2012
> > @@ -1643,6 +1643,7 @@
> >
> > static void *PthreadExit(void *a) {
> > pthread_exit(0);
> > + return 0;
> > }
> >
> > TEST(AddressSanitizer, PthreadExitTest) {
> >
> >
> > _______________________________________________
> > 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/20120214/83e62284/attachment.html>
More information about the llvm-commits
mailing list