OSDN Git Service

Don't call clock_getres in sysconf.
authorElliott Hughes <enh@google.com>
Sat, 5 Mar 2016 02:25:57 +0000 (18:25 -0800)
committerElliott Hughes <enh@google.com>
Sat, 5 Mar 2016 02:33:42 +0000 (18:33 -0800)
commit8dd7c611ea9889b316c02861d463edee83c6a207
treee24f5abefa924ba842b40483209b068e7ce191dc
parent9721bb3f0b7c8c45f42d2874c908a177615f42b5
Don't call clock_getres in sysconf.

There are a hundred other reasons why we can't run on kernels old enough
to not have all the clocks covered by sysconf.

This was causing trouble for jemalloc 4.1.0 in a seccomp-constrained process
because jemalloc 4.1.0 introduced a call to sysconf that caused us to make
clock_getres syscalls for the first time, leading to SIGSYS.

Bug: http://b/27408522

(cherry picked from commit d2b8de2cd16ecd86c830d98c58bcf392475bd0b3)

Change-Id: Id46a0f2c2804c597a8c9091690a8a1fc4a65f4cd
libc/bionic/sysconf.cpp