<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/108068>108068</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [rtsan] glibc 2.40 regressions in tests
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          mgorny
      </td>
    </tr>
</table>

<pre>
    The following rtsan tests fail with glibc 2.40:

```
  RealtimeSanitizer-Unit :: ./Rtsan-x86_64-Test/RtsanFileTest/OpenDiesWhenRealtime
 RealtimeSanitizer-Unit :: ./Rtsan-x86_64-Test/RtsanFileTest/OpenatDiesWhenRealtime
 RealtimeSanitizer-Unit :: ./Rtsan-x86_64-Test/RtsanOpenedFileTest/PreadDiesWhenRealtime
 RealtimeSanitizer-Unit :: ./Rtsan-x86_64-Test/RtsanOpenedFileTest/ReadDiesWhenRealtime
```

If I apply #108057, the additional tests also fail:

```
 RealtimeSanitizer-Unit :: ./Rtsan-x86_64-FileOffset64-Test/RtsanFileTest/OpenDiesWhenRealtime 
  RealtimeSanitizer-Unit :: ./Rtsan-x86_64-FileOffset64-Test/RtsanFileTest/OpenatDiesWhenRealtime
 RealtimeSanitizer-Unit :: ./Rtsan-x86_64-FileOffset64-Test/RtsanOpenedFileTest/PreadDiesWhenRealtime
 RealtimeSanitizer-Unit :: ./Rtsan-x86_64-FileOffset64-Test/RtsanOpenedFileTest/ReadDiesWhenRealtime
```

All failures follow the same pattern:

```
FAIL: RealtimeSanitizer-Unit :: ./Rtsan-x86_64-Test/12/19 (3380 of 7243)
******************** TEST 'RealtimeSanitizer-Unit :: ./Rtsan-x86_64-Test/12/19' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/var/tmp/portage/sys-libs/compiler-rt-sanitizers-20.0.0_pre20240910/work/compiler-rt_build/lib/rtsan/tests/./Rtsan-x86_64-Test-RealtimeSanitizer-Unit-877-12-19.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=19 GTEST_SHARD_INDEX=12 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-20.0.0_pre20240910/work/compiler-rt_build/lib/rtsan/tests/./Rtsan-x86_64-Test
--

Script:
--
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-20.0.0_pre20240910/work/compiler-rt_build/lib/rtsan/tests/./Rtsan-x86_64-Test --gtest_filter=RtsanFileTest.OpenatDiesWhenRealtime
--
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-20.0.0_pre20240910/work/compiler-rt/lib/rtsan/tests/rtsan_test_utilities.h:40: Failure
Death test: RealtimeInvoke(std::forward<Function>(Func))
 Result: failed to die.
 Error msg:
[  DEATH   ] 


/var/tmp/portage/sys-libs/compiler-rt-sanitizers-20.0.0_pre20240910/work/compiler-rt/lib/rtsan/tests/rtsan_test_utilities.h:40
Death test: RealtimeInvoke(std::forward<Function>(Func))
    Result: failed to die.
 Error msg:
[  DEATH   ] 



********************
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMV9uOozgQ_RrnpQQyRS7wwENmCNuRWtujJK3dt8iAA55xMLJNsr1fvzIhO53W9Mz0VS0hkLn41Kk6PmWYMaJqOE_I5BOZpCPW2VrpZF8p3dyNclXeJZuaw05JqY6iqUBbwxqw3FgDOyYkHIWtoZIiLwD9MSXhnNCU0PN5SoejHwKsOJNW7PmaNcKKf7n2bhthwX0WzsEnmK0cgvdPNN1Ox96GG3u-lwnJh_FNy5tUcPNXzZvzjAPC6wEw-_oQbl5e3gP6ojkr3wFn9SjMgxKdzssdLIG1rbwDgmFAIzqZEfwMtubAylJYoRomBx0waVQvhl8U_4l8XPQ3u53h9mlCgGdq7XfxXksXj-K9pUh-H_SJiplL2Wug09wMftGrxbA9h5ZZy3Xzc31k8-W1i_l5sg_QnWIgGIVhREHtYIbjkGA8gOHzD9gs1hsgOHtRaARn4DguUnhJMCc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