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

David Blaikie dblaikie at gmail.com
Mon Feb 13 08:33:19 PST 2012


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




More information about the llvm-commits mailing list