Skip to content
Permalink
Browse files

fix build with UBSAN

Summary:
```lang
Assertion failure: buck-out/dev/gen/hphp/util/alloc#header-mode-symlink-tree-with-header-map,headers/hphp/util/alloc.h:344: int HPHP::mallctlHelper(const char *, T *, T *, bool) [T
= unsigned int]: assertion `mallctl != nullptr' failed.
```

Reviewed By: edwinsmith, meyering

Differential Revision: D6348354

fbshipit-source-id: 1e23aac7b880da94f662fb42f82228062fd124de
  • Loading branch information
igorsugak authored and hhvm-bot committed Nov 16, 2017
1 parent 5ebc194 commit 498bf807e4efa4c6233600d37931fc38ade5cb14
Showing with 2 additions and 1 deletion.
  1. +2 −1 hphp/util/alloc.h
@@ -27,7 +27,8 @@
#include "hphp/util/assertions.h"
#include "hphp/util/exception.h"

#if defined(FOLLY_SANITIZE_ADDRESS) || defined(FOLLY_SANITIZE_THREAD)
#if defined(FOLLY_SANITIZE_ADDRESS) || defined(FOLLY_SANITIZE_THREAD) || \
defined(UNDEFINED_SANITIZER)
// ASan is less precise than valgrind so we'll need a superset of those tweaks
# define VALGRIND
// TODO: (t2869817) ASan doesn't play well with jemalloc

0 comments on commit 498bf80

Please sign in to comment.
You can’t perform that action at this time.