[llvm-commits] [compiler-rt] r150381 - /compiler-rt/trunk/lib/asan/tests/asan_test.cc

Kostya Serebryany kcc at google.com
Mon Feb 13 09:23:41 PST 2012


On Mon, Feb 13, 2012 at 8:33 AM, 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


This code does not include LLVM headers.

--kcc


> 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
>
> _______________________________________________
> 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/20120213/9317b8fb/attachment.html>


More information about the llvm-commits mailing list