mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Fix getauxval for sanitizer builds
This commit is contained in:
parent
2e7013f439
commit
a89e847514
@ -8,6 +8,8 @@
|
||||
#include <link.h> // ElfW
|
||||
#include <errno.h>
|
||||
|
||||
#include "syscall.h"
|
||||
|
||||
#define ARRAY_SIZE(a) sizeof((a))/sizeof((a[0]))
|
||||
|
||||
/// Suppress TSan since it is possible for this code to be called from multiple threads,
|
||||
@ -39,7 +41,9 @@ ssize_t __retry_read(int fd, void * buf, size_t count)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
ssize_t ret = read(fd, buf, count);
|
||||
// We cannot use the read syscall as it will be intercept by sanitizers, which aren't
|
||||
// initialized yet. Emit syscall directly.
|
||||
ssize_t ret = __syscall_ret(__syscall(SYS_read, fd, buf, count));
|
||||
if (ret == -1)
|
||||
{
|
||||
if (errno == EINTR)
|
||||
|
Loading…
Reference in New Issue
Block a user