StarlingX Fault Management
Go to file
Erich Cordoba 47209218ac Avoid null check for reference in fm_snmp_util_gen_trap
As C++ references cannot be NULL, new compilers optimizes the code
assuming this condition. Therefore, in new compilers, from GCC 6 to
8 the fn_snmp_util_gen_trap will segfault trying to deference
data.entity_instance_id as the if (&data != NULL) will be always
optimized to be true.

Turns out that the case where SFmAlarmDataT is expected to be NULL
(or empty) is when the alarm type is WARM_START. So changing the if
statement to look for WARM_START instead of checking the null reference
seems to be a feasible solution.

Story: 2003498
Task: 24775

Change-Id: Ica07ec8d7ad009e1048f014b0a6440c76de09eef
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2018-08-22 23:35:29 -05:00
fm-api Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fm-common Avoid null check for reference in fm_snmp_util_gen_trap 2018-08-22 23:35:29 -05:00
fm-doc add flake8 as pep8 codestyle check. 2018-08-10 11:39:57 +08:00
fm-mgr Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fm-rest-api Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
python-fmclient Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
snmp-audittrail StarlingX open source release updates 2018-05-31 07:36:00 -07:00
snmp-ext StarlingX open source release updates 2018-05-31 07:36:00 -07:00
.gitignore Add default test framework 2018-06-09 08:44:12 -05:00
.gitreview Add .gitreview 2018-05-31 07:36:00 -07:00
.zuul.yaml add flake8 as pep8 codestyle check. 2018-08-10 11:39:57 +08:00
CONTRIBUTORS.wrs StarlingX open source release updates 2018-05-31 07:36:00 -07:00
LICENSE StarlingX open source release updates 2018-05-31 07:36:00 -07:00
README.rst StarlingX open source release updates 2018-05-31 07:36:00 -07:00
centos_pkg_dirs Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
mwa-cleo.map StarlingX open source release updates 2018-05-31 07:36:00 -07:00
test-requirements.txt add flake8 as pep8 codestyle check. 2018-08-10 11:39:57 +08:00
tox.ini add flake8 as pep8 codestyle check. 2018-08-10 11:39:57 +08:00

README.rst

stx-fault

StarlingX Fault Management