Автор работы: Пользователь скрыл имя, 11 Апреля 2013 в 06:34, реферат
Исходя из Issue 29896 для NDK обработка директив APP_SHORT_COMMANDS и LOCAL_SHORT_COMMANDS осуществляется неправильно и может приводить к падениям, если на вход функции CreateProcess подаётся >32k символов. Без данных директив всё ещё хуже.
Исходя из Issue 29896 для NDK обработка директив APP_SHORT_COMMANDS и LOCAL_SHORT_COMMANDS осуществляется неправильно и может приводить к падениям, если на вход функции CreateProcess подаётся >32k символов. Без данных директив всё ещё хуже.
Для решения проблемы с функцией CreateProcess нужно проделать следующие шаги:
LOCAL_SHORT_COMMANDS := true
HOST_ECHO := echo
APP_SHORT_COMMANDS := true
В районе 300 строки:
Было |
Стало |
LOCAL_SHORT_COMMANDS := $(strip $(LOCAL_SHORT_COMMANDS)) ifndef LOCAL_SHORT_COMMANDS LOCAL_SHORT_COMMANDS := $(strip $(NDK_APP_SHORT_COMMANDS)) endif ifeq ($(LOCAL_SHORT_COMMANDS)), # For static and whole static libraries ifneq (,$(filter STATIC_LIBRARY
WHOLE_STATIC_LIBRARY,$(call module-get-class,$(LOCAL_ $(call ndk_log,Building static library module '$(LOCAL_MODULE)' with linker list file) ar_options := $(ar_objects) ar_list_file
:= $(LOCAL_OBJS_DIR)/archiver. ar_options := @$(call host-path,$(ar_list_file))) $(call
generate-list-file,$(ar_
$(LOCAL_BUILT_MODULE): $(ar_list_file) endif |
LOCAL_SHORT_COMMANDS := $(strip $(LOCAL_SHORT_COMMANDS)) ifndef LOCAL_SHORT_COMMANDS LOCAL_SHORT_COMMANDS := $(strip $(NDK_APP_SHORT_COMMANDS)) endif ifeq ($(LOCAL_SHORT_COMMANDS),true) # For static and whole static libraries ifneq (,$(filter STATIC_LIBRARY
WHOLE_STATIC_LIBRARY,$(call module-get-class,$(LOCAL_ $(call ndk_log,Building static library module '$(LOCAL_MODULE)' with linker list file) ar_options := $(ar_objects) ar_list_file
:= $(LOCAL_OBJS_DIR)/archiver. ar_objects := @$(call host-path,$(ar_list_file)) $(call
generate-list-file,$(ar_
$(LOCAL_BUILT_MODULE): $(ar_list_file) endif |
В районе 273 строки
Было |
Стало |
define generate-list-file-slice ifneq (,$$(word $1,$3)) @@ -273,33 273,53 @@ define generate-list-file-ev __list_file := $2
.PHONY: $$(__list_file)
$$(__list_file): @ $$(host-mkdir) $$(dir $$@) $$(hide) $$(HOST_ECHO) "$(wordlist 1,99,$1)" > $$@ $(call generate-list-file-slice,100, $(call generate-list-file-slice,200, $(call generate-list-file-slice,300, $(call generate-list-file-slice,400, $(call generate-list-file-slice,500, $(call generate-list-file-slice,600, $(call generate-list-file-slice,700, $(call generate-list-file-slice,800, $(call generate-list-file-slice,900, $(call generate-list-file-slice,1000, $(call generate-list-file-slice,1100, $(call generate-list-file-slice,1200, $(call generate-list-file-slice,1300, $(call generate-list-file-slice,1400, $(call generate-list-file-slice,1500, $(call generate-list-file-slice,1600, $(call generate-list-file-slice,1700, $(call generate-list-file-slice,1800, $(call generate-list-file-slice,1900, endef |
define generate-list-file-slice ifneq (,$$(word $1,$3)) @@ -273,33 273,53 @@ define generate-list-file-ev __list_file := $2
.PHONY: $$(__list_file)
$$(__list_file): @$$(call host-mkdir,$$(dir $$@)) $$(hide) $$(HOST_ECHO) "$(wordlist 1,49,$1)" > $$@ $(call generate-list-file-slice,50, $(call generate-list-file-slice,100, $(call generate-list-file-slice,150, $(call generate-list-file-slice,200, $(call generate-list-file-slice,250, $(call generate-list-file-slice,300, $(call generate-list-file-slice,350, $(call generate-list-file-slice,400, $(call generate-list-file-slice,450, $(call generate-list-file-slice,500, $(call generate-list-file-slice,550, $(call generate-list-file-slice,600, $(call generate-list-file-slice,650, $(call generate-list-file-slice,700, $(call generate-list-file-slice,750, $(call generate-list-file-slice,800, $(call generate-list-file-slice,850, $(call generate-list-file-slice,900, $(call generate-list-file-slice,950, $(call generate-list-file-slice,1000, $(call generate-list-file-slice,1050, $(call generate-list-file-slice,1100, $(call generate-list-file-slice,1150, $(call generate-list-file-slice,1200, $(call generate-list-file-slice,1250, $(call generate-list-file-slice,1300, $(call generate-list-file-slice,1350, $(call generate-list-file-slice,1400, $(call generate-list-file-slice,1450, $(call generate-list-file-slice,1500, $(call generate-list-file-slice,1550, $(call generate-list-file-slice,1600, $(call generate-list-file-slice,1650, $(call generate-list-file-slice,1700, $(call generate-list-file-slice,1750, $(call generate-list-file-slice,1800, $(call generate-list-file-slice,1850, $(call generate-list-file-slice,1900, $(call generate-list-file-slice,1950, endef |
После предыдущего изменения уже возле строки 1135:
Было |
Стало |
# the list of variables that *must* be defined in Application.mk files NDK_APP_VARS_REQUIRED := # the list of variables that *may* be defined in Application.mk files NDK_APP_VARS_OPTIONAL := APP_OPTIM APP_CPPFLAGS APP_CFLAGS APP_CXXFLAGS\ APP_PLATFORM APP_BUILD_SCRIPT APP_ABI APP_MODULES\ APP_PROJECT_PATH APP_STL |
# the list of variables that *must* be defined in Application.mk files NDK_APP_VARS_REQUIRED := # the list of variables that *may* be defined in Application.mk files NDK_APP_VARS_OPTIONAL := APP_OPTIM APP_CPPFLAGS APP_CFLAGS APP_CXXFLAGS\ APP_PLATFORM APP_BUILD_SCRIPT APP_ABI APP_MODULES\ APP_PROJECT_PATH APP_STL APP_SHORT_COMMANDS |