[PATCH] D57876: Implement pthread_exit() interceptor for Thread sanitizer

Yuri Per via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 7 23:23:27 PST 2019


yuri added a comment.

Can someone with access to ppc64be system help to investigate the issue?

1. Check if the test works without any sanitizers.
2. What versions of gcc and glibc are installed on the host?
3. Run test under gdb and collect stack trace at crash point.

  #include <pthread.h>
  #include <stdio.h>
  #include <stdlib.h>
  
  int var;
  
  void *Thread(void *x) {
    pthread_exit(&var);
    return 0;
  }
  
  int main() {
    pthread_t t;
    pthread_create(&t, 0, Thread, 0);
    void *retval = 0;
    pthread_join(t, &retval);
    if (retval != &var) {
      fprintf(stderr, "Unexpected return value\n");
      exit(1);
    }
    fprintf(stderr, "PASS\n");
    return 0;
  }


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57876/new/

https://reviews.llvm.org/D57876





More information about the llvm-commits mailing list