<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/107988>107988</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[RealtimeSanitizer] Problems with interceptor tests.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
yingcong-wu
</td>
</tr>
</table>
<pre>
I found some problems when running the recent added test for realtime sanitizer interceptor.
1. In my use case, I would enable `_FILE_OFFSET_BITS=64` by default, then the following test would fail because they don't have the 64bit version.
```
RealtimeSanitizer-Unit::./Rtsan-x86_64-Test/RtsanOpenedFileTest/PreadDiesWhenRealtime
RealtimeSanitizer-Unit::./Rtsan-x86_64-Test/RtsanOpenedFileTest/PwriteDiesWhenRealtime
RealtimeSanitizer-Unit::./Rtsan-x86_64-Test/RtsanFileTest/CreatDiesWhenRealtime
RealtimeSanitizer-Unit::./Rtsan-x86_64-Test/RtsanFileTest/FcntlFlockDiesWhenRealtime
RealtimeSanitizer-Unit::./Rtsan-x86_64-Test/RtsanFileTest/FcntlSetFdDiesWhenRealtime
RealtimeSanitizer-Unit::./Rtsan-x86_64-Test/RtsanFileTest/FopenDiesWhenRealtime
RealtimeSanitizer-Unit::./Rtsan-x86_64-Test/RtsanFileTest/OpenDiesWhenRealtime
RealtimeSanitizer-Unit::./Rtsan-x86_64-Test/RtsanFileTest/OpenatDiesWhenRealtime
RealtimeSanitizer-Unit::./Rtsan-x86_64-Test/TestRtsanInterceptors/FcntlDiesWhenRealtime
```
Do we have plan to add the 64bit version of those functions to interceptors?
2. I use `Red Hat Enterprise Linux 9.0 (Plow)` and `Ubuntu 22.04 LTS`, and the following code will work fine with Ubuntu and will segment fault for the redhat.
```
#include <pthread.h>
int main() {
pthread_t thread{};
pthread_join(thread, nullptr);
return 0;
}
```
Therefore test case PthreadMutexJoinDiesWhenRealtime would segment fault when I test it on the RedHat 9.
CC @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