Skip to content

Commit

Permalink
Fix crash-on-startup on macOS 12 (#18779) (#18864)
Browse files Browse the repository at this point in the history
gperftools_tcmalloc is not compatible with macOS 12, resulting in a
crash on startup. The crash happens very early, before CLI args are
parsed.

Fixes #17535
(cherry picked from commit b9939c6)

Signed-off-by: Greg Greenway <[email protected]>
  • Loading branch information
ggreenway authored Nov 2, 2021
1 parent 9d581d2 commit 4cc4e60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,13 @@ build:clang-asan --linkopt -fuse-ld=lld
build:clang-asan --linkopt --rtlib=compiler-rt
build:clang-asan --linkopt --unwindlib=libgcc

# macOS ASAN/UBSAN
# macOS
build:macos --cxxopt=-std=c++17
build:macos --action_env=PATH=/usr/bin:/bin:/opt/homebrew/bin:/usr/local/bin:/opt/local/bin
build:macos --host_action_env=PATH=/usr/bin:/bin:/opt/homebrew/bin:/usr/local/bin:/opt/local/bin
build:macos --define tcmalloc=disabled

# macOS ASAN/UBSAN
build:macos-asan --config=asan
# Workaround, see https://github.com/bazelbuild/bazel/issues/6932
build:macos-asan --copt -Wno-macro-redefined
Expand Down
1 change: 1 addition & 0 deletions docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Bug Fixes
* http: remove redundant Warn log in HTTP codec.
* listener: fix a crash when updating any listener that does not bind to port.
* listener: listener add can reuse the listener socket of a draining filter chain listener and fix the request lost.
* mac: fix crash on startup on macOS 12 by changing the default allocator.

Removed Config or Runtime
-------------------------
Expand Down

0 comments on commit 4cc4e60

Please sign in to comment.