mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 02:53:38 +00:00
a4f9e1da5b
getauxval() from glibc-compatibility did not work always correctly:
- It does not work after setenv(), and this breaks vsyscalls,
like sched_getcpu() [1] (and BaseDaemon.cpp always set TZ if timezone
is defined, which is true for CI [2]).
Also note, that fixing setenv() will not fix LSan,
since the culprit is getauxval()
[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1163404
[2]: ClickHouse#32928 (comment)
- Another think that is definitely broken is LSan (Leak Sanitizer), it
relies on worked getauxval() but it does not work if __environ is not
initialized yet (there is even a commit about this).
And because of, at least, one leak had been introduced [3]:
[3]: ClickHouse#33840
Fix this by using /proc/self/auxv with fallback to environ solution to
make it compatible with environment that does not allow reading from
auxv (or no procfs).
v2: add fallback to environ solution
v3: fix return value for __auxv_init_procfs()
(cherry picked from commit
|
||
---|---|---|
.. | ||
aarch64 | ||
x86_64 | ||
__math_divzero.c | ||
__math_divzerof.c | ||
__math_invalid.c | ||
__math_invalidf.c | ||
__math_oflow.c | ||
__math_oflowf.c | ||
__math_uflow.c | ||
__math_uflowf.c | ||
__math_xflow.c | ||
__math_xflowf.c | ||
__polevll.c | ||
accept4.c | ||
atomic.h | ||
clock_getres.c | ||
clock_gettime.c | ||
clock_nanosleep.c | ||
COPYRIGHT | ||
epoll.c | ||
eventfd.c | ||
exp2.c | ||
exp2f_data.c | ||
exp2f_data.h | ||
exp2f.c | ||
exp_data.c | ||
exp_data.h | ||
exp.c | ||
fallocate.c | ||
fcntl.c | ||
futimens.c | ||
getauxval.c | ||
getentropy.c | ||
getrandom.c | ||
glob.c | ||
lgamma.c | ||
lgammal.c | ||
libm.h | ||
log2_data.c | ||
log2_data.h | ||
log2.c | ||
log2f_data.c | ||
log2f_data.h | ||
log2f.c | ||
log_data.c | ||
log_data.h | ||
log.c | ||
logf_data.c | ||
logf_data.h | ||
logf.c | ||
mkstemps.c | ||
musl_features.h | ||
pipe2.c | ||
posix_spawn.c | ||
pow_data.c | ||
pow_data.h | ||
pow.c | ||
powf_data.c | ||
powf_data.h | ||
powf.c | ||
powl.c | ||
pwritev.c | ||
README | ||
sched_cpucount.c | ||
sched_getcpu.c | ||
secure_getenv.c | ||
strsignal.c | ||
sync_file_range.c | ||
syscall_ret.c | ||
syscall.h | ||
timerfd.c | ||
timespec_get.c | ||
utimensat.c | ||
vasprintf.c | ||
vdso.c |
Tiny pieces extracted from MUSL library. git://git.musl-libc.org/musl c10bc61508dc52b8315084e628f36a6c3c2dabb1 NOTE: Files was edited. NOTE: Math related files are pulled from commit 6ad514e4e278f0c3b18eb2db1d45638c9af1c07f.