Skip to content

CodeQL tcmalloc build failure clang-11 #23891

@botengyao

Description

@botengyao

Title: CodeQL tcmalloc build failure clang-11

Description:
My recent PR ran into a CodeQL build failure for an external tcmalloc package. Looks like it is not related to my changes, but not sure about that. Can someone also help investigate? Thank you!

Other than that, we are using clang-11 to build targets in CodeQL pipeline. Should we upgrade it?

ERROR: /home/runner/.cache/bazel/_bazel_runner/232997f8e2d32d79d849393f4fd56253/external/com_github_google_tcmalloc/tcmalloc/internal/BUILD:544:11: Compiling tcmalloc/internal/percpu.cc failed: (Exit 1): clang-11 failed: error executing command (from target @com_github_google_tcmalloc//tcmalloc/internal:percpu) /home/runner/work/envoy/envoy/bin/clang11/bin/clang-11 -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer '-stdlib=libc++' -MD -MF ... (remaining 33 arguments skipped)
72external/com_github_google_tcmalloc/tcmalloc/internal/percpu.cc:57:5: error: variable does not have a constant initializer
73    __rseq_abi = {
74    ^            ~
75external/com_github_google_tcmalloc/tcmalloc/internal/percpu.cc:56:1: note: required by 'require_constant_initialization' attribute here
76ABSL_CONST_INIT thread_local ABSL_ATTRIBUTE_WEAK volatile kernel_rseq
77^~~~~~~~~~~~~~~
78external/com_google_absl/absl/base/attributes.h:714:27: note: expanded from macro 'ABSL_CONST_INIT'
79#define ABSL_CONST_INIT [[clang::require_constant_initialization]]

[optional Relevant Links:]
https://github.com/envoyproxy/envoy/actions/runs/3420660896/jobs/5695766220
google/tcmalloc#148
https://github.com/google/tcmalloc/blob/master/tcmalloc/internal/percpu.cc#L57

#23485

Metadata

Metadata

Assignees

Labels

area/buildarea/ciquestionQuestions that are neither investigations, bugs, nor enhancements

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions