Security improvements

Improvements include
* adding additional build flags that warn about stack-smashing
and type conversion errors
* run-time checks for valid function input values and adquate
space for the result of arithmetic operations.
* make sure default case for switch statements do something
besides just assert
* disable using env. var. debugging in release mode

Change-Id: I5f048310c5c56e05d9ec31bcc273404d6a0dd646
This commit is contained in:
Chris Freehill
2020-01-14 15:37:52 -06:00
parent fe4f7ed4a1
commit d00b9ac07d
11 changed files with 278 additions and 89 deletions
+3
View File
@@ -224,6 +224,9 @@ static const std::map<const char *, monitor_depends_t> kMonFuncDependsMap = {
Monitor::Monitor(std::string path, RocmSMI_env_vars const *e) :
path_(path), env_(e) {
#ifdef NDEBUG
env_ = nullptr;
#endif
}
Monitor::~Monitor(void) {
}