From 09c467e423d9dcb41c644693c6cf8241566e19df Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Wed, 2 Dec 2015 10:44:27 -0600 Subject: [PATCH] Input processor crashes if second event with same name is created When allocating a new event, if the same name is used, no allocation is created and NULL is returned. We start trying to use the returned value which seg-faulted. I added a check to only continue if the returned value from the allocation is not NULL. refs #149 --- .gitignore | 1 + trick_sims/.gitignore | 1 + trick_sims/SIM_trickcomm/.gitignore | 4 ++++ .../DPX/test/unit_test/.gitignore | 5 +++++ .../sim_services/Clock/test/.gitignore | 3 +++ .../sim_services/Executive/test/.gitignore | 2 ++ .../sim_services/Integrator/test/.gitignore | 2 ++ .../MemoryManager/test/.gitignore | 20 +++++++++++++++++++ .../sim_services/MonteCarlo/test/.gitignore | 3 +++ .../ScheduledJobQueue/test/.gitignore | 2 ++ .../sim_services/Timer/test/.gitignore | 2 ++ trick_source/trick_utils/comm/test/.gitignore | 1 + .../trick_utils/interpolator/test/.gitignore | 2 ++ .../trick_utils/units/test/.gitignore | 3 +++ 14 files changed, 51 insertions(+) create mode 100644 trick_sims/SIM_trickcomm/.gitignore create mode 100644 trick_source/data_products/DPX/test/unit_test/.gitignore create mode 100644 trick_source/sim_services/Clock/test/.gitignore create mode 100644 trick_source/sim_services/Executive/test/.gitignore create mode 100644 trick_source/sim_services/Integrator/test/.gitignore create mode 100644 trick_source/sim_services/MemoryManager/test/.gitignore create mode 100644 trick_source/sim_services/MonteCarlo/test/.gitignore create mode 100644 trick_source/sim_services/ScheduledJobQueue/test/.gitignore create mode 100644 trick_source/sim_services/Timer/test/.gitignore create mode 100644 trick_source/trick_utils/comm/test/.gitignore create mode 100644 trick_source/trick_utils/interpolator/test/.gitignore create mode 100644 trick_source/trick_utils/units/test/.gitignore diff --git a/.gitignore b/.gitignore index 35d1eb0f..c4f4cc8d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ lib_Darwin_* *.dox Makefile_jsc_dirs .DS_Store +trick_test diff --git a/trick_sims/.gitignore b/trick_sims/.gitignore index 61f60d81..4c606fb1 100644 --- a/trick_sims/.gitignore +++ b/trick_sims/.gitignore @@ -17,6 +17,7 @@ S_default.dat S_document.xml S_library_list S_main_* +T_main_* S_sie.resource S_source.cpp S_source.hh diff --git a/trick_sims/SIM_trickcomm/.gitignore b/trick_sims/SIM_trickcomm/.gitignore new file mode 100644 index 00000000..eff10ebc --- /dev/null +++ b/trick_sims/SIM_trickcomm/.gitignore @@ -0,0 +1,4 @@ +tc_client +tc_client.dSYM +tc_server +tc_server.dSYM diff --git a/trick_source/data_products/DPX/test/unit_test/.gitignore b/trick_source/data_products/DPX/test/unit_test/.gitignore new file mode 100644 index 00000000..8d0b6a77 --- /dev/null +++ b/trick_source/data_products/DPX/test/unit_test/.gitignore @@ -0,0 +1,5 @@ +DPC_test +DPM_test +DS_test +*.o + diff --git a/trick_source/sim_services/Clock/test/.gitignore b/trick_source/sim_services/Clock/test/.gitignore new file mode 100644 index 00000000..8ed8bd85 --- /dev/null +++ b/trick_source/sim_services/Clock/test/.gitignore @@ -0,0 +1,3 @@ +*.o +BC635Clock_test +TPROCTEClock_test diff --git a/trick_source/sim_services/Executive/test/.gitignore b/trick_source/sim_services/Executive/test/.gitignore new file mode 100644 index 00000000..c0eac510 --- /dev/null +++ b/trick_source/sim_services/Executive/test/.gitignore @@ -0,0 +1,2 @@ +*.o +Executive_test diff --git a/trick_source/sim_services/Integrator/test/.gitignore b/trick_source/sim_services/Integrator/test/.gitignore new file mode 100644 index 00000000..626aae79 --- /dev/null +++ b/trick_source/sim_services/Integrator/test/.gitignore @@ -0,0 +1,2 @@ +*.o +Integrator_unittest diff --git a/trick_source/sim_services/MemoryManager/test/.gitignore b/trick_source/sim_services/MemoryManager/test/.gitignore new file mode 100644 index 00000000..0495036d --- /dev/null +++ b/trick_source/sim_services/MemoryManager/test/.gitignore @@ -0,0 +1,20 @@ +*.o +.icg_no_found +Bitfield_tests +MM_alloc_deps +MM_clear_var_unittest +MM_creation_unittest +MM_declare_extern_var_unittest +MM_declare_var_2_unittest +MM_declare_var_unittest +MM_delete_var_unittest +MM_get_enumerated +MM_read_checkpoint +MM_ref_attributes_unittest +MM_ref_name_from_address +MM_resize_array_unittest +MM_sizeof_type_unittest +MM_strdup_unittest +MM_write_checkpoint +MM_write_checkpoint_hexfloat +MM_write_var_unittest diff --git a/trick_source/sim_services/MonteCarlo/test/.gitignore b/trick_source/sim_services/MonteCarlo/test/.gitignore new file mode 100644 index 00000000..82c9a953 --- /dev/null +++ b/trick_source/sim_services/MonteCarlo/test/.gitignore @@ -0,0 +1,3 @@ +*.o +MonteCarlo_exceptions +MonteCarlo_test diff --git a/trick_source/sim_services/ScheduledJobQueue/test/.gitignore b/trick_source/sim_services/ScheduledJobQueue/test/.gitignore new file mode 100644 index 00000000..098cdd8f --- /dev/null +++ b/trick_source/sim_services/ScheduledJobQueue/test/.gitignore @@ -0,0 +1,2 @@ +*.o +ScheduledJobQueue_test diff --git a/trick_source/sim_services/Timer/test/.gitignore b/trick_source/sim_services/Timer/test/.gitignore new file mode 100644 index 00000000..611d4db1 --- /dev/null +++ b/trick_source/sim_services/Timer/test/.gitignore @@ -0,0 +1,2 @@ +*.o +ITimer_test diff --git a/trick_source/trick_utils/comm/test/.gitignore b/trick_source/trick_utils/comm/test/.gitignore new file mode 100644 index 00000000..3a81f610 --- /dev/null +++ b/trick_source/trick_utils/comm/test/.gitignore @@ -0,0 +1 @@ +comm_test diff --git a/trick_source/trick_utils/interpolator/test/.gitignore b/trick_source/trick_utils/interpolator/test/.gitignore new file mode 100644 index 00000000..ad47b65c --- /dev/null +++ b/trick_source/trick_utils/interpolator/test/.gitignore @@ -0,0 +1,2 @@ +*.o +Interpolator_unittest diff --git a/trick_source/trick_utils/units/test/.gitignore b/trick_source/trick_utils/units/test/.gitignore new file mode 100644 index 00000000..cae4b199 --- /dev/null +++ b/trick_source/trick_utils/units/test/.gitignore @@ -0,0 +1,3 @@ +*.o +UnitConvTestSuite +UnitTestSuite