Fix folly::dynamic crash when attaching a debugger to Hermes
Summary: folly_futures was compiled with and exported -DFOLLY_MOBILE=1, while folly_json did not. This flag disables fancy F14 data structures for folly::dynamic in favor of a simple std::unordered_map. This caused inlined/templated code from modules depending on folly_futures to disagree with the implementations in folly_json, leading to a crash. The only such libraries were libhermes-inspector and (transitively) libhermes-executor-debug, and these only use folly::dynamic for CDP serialization, which is why the problem was not more apparent. Changelog: [Internal] Fix crash when attaching a Hermes debugger Reviewed By: mhorowitz Differential Revision: D21193307 fbshipit-source-id: 2b795bb6f4f7f991e2adaacec62d62616117322b
This commit is contained in:
Родитель
18f1c69033
Коммит
b645f23708
|
@ -36,7 +36,8 @@ FOLLY_FLAGS := \
|
|||
-DFOLLY_NO_CONFIG=1 \
|
||||
-DFOLLY_HAVE_CLOCK_GETTIME=1 \
|
||||
-DFOLLY_HAVE_MEMRCHR=1 \
|
||||
-DFOLLY_USE_LIBCPP=1
|
||||
-DFOLLY_USE_LIBCPP=1 \
|
||||
-DFOLLY_MOBILE=1
|
||||
|
||||
# If APP_PLATFORM in Application.mk targets android-23 above, please comment this line.
|
||||
# NDK uses GNU style stderror_r() after API 23.
|
||||
|
@ -87,9 +88,6 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
|||
|
||||
LOCAL_CFLAGS += -fexceptions -fno-omit-frame-pointer -frtti -Wno-sign-compare
|
||||
|
||||
FOLLY_FLAGS += \
|
||||
-DFOLLY_MOBILE=1
|
||||
|
||||
LOCAL_CFLAGS += $(FOLLY_FLAGS)
|
||||
|
||||
LOCAL_EXPORT_CPPFLAGS := $(FOLLY_FLAGS)
|
||||
|
|
Загрузка…
Ссылка в новой задаче