Closed sergey-safarov closed 1 month ago
I have applied this change
diff --git a/tcmalloc/internal/percpu_tcmalloc.h b/tcmalloc/internal/percpu_tcmalloc.h
index 0157ffe..11345d3 100644
--- a/tcmalloc/internal/percpu_tcmalloc.h
+++ b/tcmalloc/internal/percpu_tcmalloc.h
@@ -682,7 +682,6 @@ static inline ABSL_ATTRIBUTE_ALWAYS_INLINE int TcmallocSlab_Internal_Push(
// the x16 or x17 register according to the ARMv8 ABI standard.
#if TCMALLOC_INTERNAL_PERCPU_USE_RSEQ_ASM_GOTO
: "x16", "x17", "cc", "memory"
- : overflow_label
#else
: "x16", "x17", "memory"
#endif
I got other build error
ERROR: /tmp/tcmalloc/tcmalloc/BUILD:110:11: Compiling tcmalloc/tcmalloc.cc failed: (Exit 1): process-wrapper failed: error executing CppCompile command
(cd /home/centos/.cache/bazel/_bazel_centos/54050d9eace562345e749d605caa8143/sandbox/processwrapper-sandbox/398/execroot/com_google_tcmalloc && \
exec env - \
PATH=/home/centos/.local/bin:/home/centos/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin \
PWD=/proc/self/cwd \
TMPDIR=/tmp \
/home/centos/.cache/bazel/_bazel_centos/install/e35776b7f6e7942d80f99a8a88bdd24b/process-wrapper '--timeout=0' '--kill_delay=15' '--stats=/home/centos/.cache/bazel/_bazel_centos/54050d9eace562345e749d605caa8143/sandbox/processwrapper-sandbox/398/stats.out' /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++14' -MD -MF bazel-out/aarch64-fastbuild/bin/tcmalloc/_objs/tcmalloc_deprecated_perthread/tcmalloc.pic.d '-frandom-seed=bazel-out/aarch64-fastbuild/bin/tcmalloc/_objs/tcmalloc_deprecated_perthread/tcmalloc.pic.o' -fPIC '-DBAZEL_CURRENT_REPOSITORY=""' -iquote . -iquote bazel-out/aarch64-fastbuild/bin -iquote external/com_google_absl -iquote bazel-out/aarch64-fastbuild/bin/external/com_google_absl '-std=c++17' -DTCMALLOC_DEPRECATED_PERTHREAD -Werror -Wno-attribute-alias -Wno-sign-compare -Wno-stringop-overflow -Wno-uninitialized -Wno-unused-function -Wno-unused-result -Wno-unused-variable -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c tcmalloc/tcmalloc.cc -o bazel-out/aarch64-fastbuild/bin/tcmalloc/_objs/tcmalloc_deprecated_perthread/tcmalloc.pic.o)
during RTL pass: expand
In file included from ./tcmalloc/cpu_cache.h:41,
from ./tcmalloc/allocation_sampling.h:25,
from tcmalloc/tcmalloc.cc:91:
In function 'int tcmalloc::tcmalloc_internal::subtle::percpu::TcmallocSlab_Internal_Push(typename TcmallocSlab<NumClasses>::Slabs*, size_t, void*, Shift, OverflowHandler, void*, size_t) [with long unsigned int NumClasses = 172]',
inlined from 'bool tcmalloc::tcmalloc_internal::subtle::percpu::TcmallocSlab<NumClasses>::Push(size_t, void*, tcmalloc::tcmalloc_internal::subtle::percpu::OverflowHandler, void*) [with long unsigned int NumClasses = 172]' at ./tcmalloc/internal/percpu_tcmalloc.h:723:48,
inlined from 'void tcmalloc::tcmalloc_internal::cpu_cache_internal::CpuCache<Forwarder>::Deallocate(void*, size_t) [with Forwarder = tcmalloc::tcmalloc_internal::cpu_cache_internal::StaticForwarder]' at ./tcmalloc/cpu_cache.h:666:17,
inlined from 'void tcmalloc::tcmalloc_internal::FreeSmallSlow(void*, size_t)' at tcmalloc/tcmalloc.cc:611:38:
./tcmalloc/internal/percpu_tcmalloc.h:595:3: internal compiler error: 'asm' clobber conflict with output operand
595 | asm volatile(
| ^~~
Please submit a full bug report, with preprocessed source.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/cc40SQMN.out file, please attach this to your bugreport.
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 70.789s, Critical Path: 17.02s
INFO: 66 processes: 3 internal, 63 processwrapper-sandbox.
https://godbolt.org/z/EMEP9E1zj for a repro with all the ifdefs removed to make it a bit easier to read.
It looks like https://github.com/google/tcmalloc/commit/13f8d0750918d68a7841958cfbc01e44326c7ad8 fixes the "'asm' clobber conflict with output operand" error mentioned above, but there is a second instance of this problem:
ERROR: /tcmalloc/tcmalloc/BUILD:97:11: Compiling tcmalloc/tcmalloc.cc failed: (Exit 1): gcc failed: error executing CppCompile command (from target //tcmalloc:tcmalloc) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++14' -MD -MF ... (remaining 32 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
during RTL pass: expand
In file included from ./tcmalloc/cpu_cache.h:52,
from tcmalloc/tcmalloc.cc:86:
In member function 'void* tcmalloc::tcmalloc_internal::subtle::percpu::TcmallocSlab<NumClasses>::Pop(size_t) [with long unsigned int NumClasses = 172]',
inlined from 'void* tcmalloc::tcmalloc_internal::cpu_cache_internal::CpuCache<Forwarder>::AllocateFast(size_t) [with Forwarder = tcmalloc::tcmalloc_internal::cpu_cache_internal::StaticForwarder]' at ./tcmalloc/cpu_cache.h:742:23,
inlined from 'Pointer tcmalloc::tcmalloc_internal::fast_alloc(size_t, Policy) [with Policy = TCMallocPolicy<MallocOomPolicy, MallocAlignPolicy>; Pointer = void*]' at tcmalloc/tcmalloc.cc:1012:50,
inlined from 'void* TCMallocInternalMalloc(size_t)' at tcmalloc/tcmalloc.cc:1099:20:
./tcmalloc/internal/percpu_tcmalloc.h:869:3: internal compiler error: 'asm' clobber conflict with output operand
869 | asm(
| ^~~
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccX2kEYa.out file, please attach this to your bugreport.
Target //tcmalloc:tcmalloc failed to build