CORBA IDL: compile dissectors with /Ox when using MSVC2013 x64
By default Windows files are compiled with /O2 optimization flag (that brings the best performance). But MSVC2013 x64 compiler generates buggy code for CORBA IDL dissectors. Let's downgrade the optimization to /Ox for those files specifically. Bug: 12495 Change-Id: Ibbb532653808d915c82bd20b55dd9e68d86b1207 Reviewed-on: https://code.wireshark.org/review/15884 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
parent
d74113fbfb
commit
581a17af40
|
@ -232,6 +232,7 @@ add_library(epan ${LINK_MODE_LIB}
|
|||
$<TARGET_OBJECTS:crypt>
|
||||
$<TARGET_OBJECTS:dfilter>
|
||||
$<TARGET_OBJECTS:dissectors>
|
||||
$<TARGET_OBJECTS:dissectors-corba>
|
||||
$<TARGET_OBJECTS:ftypes>
|
||||
$<TARGET_OBJECTS:nghttp2>
|
||||
$<TARGET_OBJECTS:wmem>
|
||||
|
|
|
@ -239,6 +239,27 @@ set(DIRTY_CORBA_IDL_DISSECTOR_SRC
|
|||
packet-tango.c
|
||||
)
|
||||
|
||||
set(CORBA_IDL_DISSECTOR_SRC
|
||||
${DIRTY_CORBA_IDL_DISSECTOR_SRC}
|
||||
packet-coseventcomm.c
|
||||
)
|
||||
|
||||
source_group(dissectors-corba FILES ${CORBA_IDL_DISSECTOR_SRC})
|
||||
|
||||
add_library(dissectors-corba OBJECT
|
||||
${CORBA_IDL_DISSECTOR_SRC}
|
||||
)
|
||||
|
||||
set_target_properties(dissectors-corba PROPERTIES
|
||||
FOLDER "Libs/epan/dissectors"
|
||||
COMPILE_DEFINITIONS "WS_BUILD_DLL"
|
||||
)
|
||||
|
||||
if(WIN32 AND "${CMAKE_GENERATOR}" STREQUAL "Visual Studio 12 2013 Win64")
|
||||
# CORBA IDL dissectors are triggering a MSVC 2013 x64 /O2 bug leading to a NULL pointer dereference (see bug 12495)
|
||||
target_compile_options(dissectors-corba PRIVATE $<$<CONFIG:Release>:/Ox> $<$<CONFIG:RelWithDebInfo>:/Ox>)
|
||||
endif()
|
||||
|
||||
set(DISSECTOR_SRC
|
||||
file-btsnoop.c
|
||||
file-elf.c
|
||||
|
@ -438,7 +459,6 @@ set(DISSECTOR_SRC
|
|||
packet-cops.c
|
||||
packet-corosync-totemnet.c
|
||||
packet-corosync-totemsrp.c
|
||||
packet-coseventcomm.c
|
||||
packet-cosine.c
|
||||
packet-couchbase.c
|
||||
packet-cp2179.c
|
||||
|
@ -1448,7 +1468,6 @@ set(DISSECTOR_FILES
|
|||
${PIDL_DISSECTOR_AUTOGEN_SRC}
|
||||
${ASN1_DISSECTOR_SRC}
|
||||
${DIRTY_ASN1_DISSECTOR_SRC}
|
||||
${DIRTY_CORBA_IDL_DISSECTOR_SRC}
|
||||
${CUSTOM_DISSECTOR_SRC}
|
||||
${CUSTOM_DIRTY_ASN1_DISSECTOR_SRC}
|
||||
)
|
||||
|
@ -1457,12 +1476,14 @@ source_group(dissectors FILES ${DISSECTOR_FILES})
|
|||
register_dissector_files(register.c
|
||||
dissectors
|
||||
${DISSECTOR_FILES}
|
||||
${CORBA_IDL_DISSECTOR_SRC}
|
||||
)
|
||||
|
||||
set(CLEAN_FILES
|
||||
${DISSECTOR_SRC}
|
||||
${PIDL_DISSECTOR_SRC}
|
||||
${ASN1_DISSECTOR_SRC}
|
||||
${CORBA_IDL_DISSECTOR_SRC}
|
||||
${DISSECTOR_SUPPORT_SRC}
|
||||
${DISSECTOR_GENERATED_FILES}
|
||||
)
|
||||
|
@ -1488,7 +1509,7 @@ set_target_properties(dissectors PROPERTIES
|
|||
|
||||
set(CHECKAPI_FILE_LIST "${CMAKE_CURRENT_BINARY_DIR}/files.txt")
|
||||
file(GLOB DISSECTOR_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.h")
|
||||
file(WRITE "${CHECKAPI_FILE_LIST}" "${DISSECTOR_FILES}")
|
||||
file(WRITE "${CHECKAPI_FILE_LIST}" "${DISSECTOR_FILES}" "${CORBA_IDL_DISSECTOR_SRC}")
|
||||
CHECKAPI(
|
||||
NAME
|
||||
dissectors
|
||||
|
|
|
@ -201,7 +201,8 @@ ASN1_DISSECTOR_SRC = \
|
|||
#
|
||||
# idl2wrs-generated CORBA IDL dissectors without warnings.
|
||||
#
|
||||
CORBA_IDL_DISSECTOR_SRC =
|
||||
CORBA_IDL_DISSECTOR_SRC = \
|
||||
packet-coseventcomm.c
|
||||
|
||||
#
|
||||
# asn2wrs-generated ASN.1 dissectors with warnings.
|
||||
|
@ -421,7 +422,6 @@ DISSECTOR_SRC = \
|
|||
packet-cops.c \
|
||||
packet-corosync-totemnet.c \
|
||||
packet-corosync-totemsrp.c \
|
||||
packet-coseventcomm.c \
|
||||
packet-cosine.c \
|
||||
packet-couchbase.c \
|
||||
packet-cp2179.c \
|
||||
|
@ -1809,4 +1809,5 @@ ALL_DISSECTORS_SRC = \
|
|||
$(PIDL_DISSECTOR_SRC) \
|
||||
$(ASN1_DISSECTOR_SRC) \
|
||||
$(DIRTY_ASN1_DISSECTOR_SRC) \
|
||||
$(CORBA_IDL_DISSECTOR_SRC) \
|
||||
$(DIRTY_CORBA_IDL_DISSECTOR_SRC)
|
||||
|
|
Loading…
Reference in New Issue