libasan bug: pthread_create never returns

Hi all,

We observed that under certain circumstances pthread_create() (libasan
implemention) does not return. The conditions are the following:

- address sanitizer enabled
- main and child thread run on the same CPU (affinity)
- real-time scheduling policy for both threads
- different scheduling priority values (this includes the case
   of setting a real-time policy for one of the threads and
   a normal policy for the other)

I am attaching an example code that can be used to reproduce this
behavior.

Thanks,
Michalis

rt_thread.c (1.43 KB)