diff --git a/site_scons/prereq_tools/base.py b/site_scons/prereq_tools/base.py index 86d4e40f3c1e..41bad71867c9 100644 --- a/site_scons/prereq_tools/base.py +++ b/site_scons/prereq_tools/base.py @@ -1,4 +1,4 @@ -# Copyright 2016-2023 Intel Corporation +# Copyright 2016-2024 Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -445,7 +445,7 @@ def __init__(self, env, opts): opts.Add(BoolVariable('FIRMWARE_MGMT', 'Build in device firmware management.', 0)) opts.Add(BoolVariable('STACK_MMAP', 'Allocate ABT ULTs stacks with mmap()', 0)) opts.Add(BoolVariable('ADDRESS_SANITIZER', - 'Instrument C code with the Address Sanitizer library', 0)) + 'Instrument C code with the Address Sanitizer library', 1)) opts.Add(EnumVariable('BUILD_TYPE', "Set the build type", 'release', ['dev', 'debug', 'release'], ignorecase=1)) opts.Add(EnumVariable('TARGET_TYPE', "Set the prerequisite type", 'default', diff --git a/site_scons/site_tools/compiler_setup.py b/site_scons/site_tools/compiler_setup.py index 562d2473dd6c..f26aac099987 100644 --- a/site_scons/site_tools/compiler_setup.py +++ b/site_scons/site_tools/compiler_setup.py @@ -9,7 +9,7 @@ '-Wno-gnu-zero-variadic-macro-arguments', '-Wno-tautological-constant-out-of-range-compare', '-Wno-unused-command-line-argument', - '-Wframe-larger-than=4096'] + '-Wframe-larger-than=8182'] # Compiler flags to prevent optimizing out security checks DESIRED_FLAGS.extend(['-fno-strict-overflow', '-fno-delete-null-pointer-checks', diff --git a/src/client/dfs/dfs.c b/src/client/dfs/dfs.c index 3d856c9a71b1..a365b02bc800 100644 --- a/src/client/dfs/dfs.c +++ b/src/client/dfs/dfs.c @@ -281,6 +281,9 @@ print_stat(struct stat *stbuf) } #endif +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-truncation" + static inline bool tspec_gt(struct timespec l, struct timespec r) { @@ -1775,7 +1778,7 @@ dfs_cont_create(daos_handle_t poh, uuid_t *cuuid, dfs_attr_t *attr, dattr.da_chunk_size = DFS_DEFAULT_CHUNK_SIZE; if (attr->da_hints[0] != 0) { - strncpy(dattr.da_hints, attr->da_hints, DAOS_CONT_HINT_MAX_LEN); + strncpy(dattr.da_hints, attr->da_hints, DAOS_CONT_HINT_MAX_LEN - 1); dattr.da_hints[DAOS_CONT_HINT_MAX_LEN - 1] = '\0'; } } else { @@ -2917,7 +2920,7 @@ dfs_global2local_all(int flags, d_iov_t glob, dfs_t **_dfs) ptr = (char *)glob.iov_buf; - strncpy(pool, ptr, DAOS_PROP_LABEL_MAX_LEN + 1); + strncpy(pool, ptr, DAOS_PROP_LABEL_MAX_LEN); pool[DAOS_PROP_LABEL_MAX_LEN] = 0; pool_len = strlen(pool) + 1; ptr += pool_len; @@ -2934,7 +2937,7 @@ dfs_global2local_all(int flags, d_iov_t glob, dfs_t **_dfs) D_GOTO(err, rc); pool_h_bump = true; - strncpy(cont, ptr, DAOS_PROP_LABEL_MAX_LEN + 1); + strncpy(cont, ptr, DAOS_PROP_LABEL_MAX_LEN); cont[DAOS_PROP_LABEL_MAX_LEN] = 0; cont_len = strlen(cont) + 1; ptr += cont_len; @@ -4537,7 +4540,7 @@ dfs_obj_local2global(dfs_t *dfs, dfs_obj_t *obj, d_iov_t *glob) oid_cp(&obj_glob->parent_oid, obj->parent_oid); uuid_copy(obj_glob->coh_uuid, coh_uuid); uuid_copy(obj_glob->cont_uuid, cont_uuid); - strncpy(obj_glob->name, obj->name, DFS_MAX_NAME + 1); + strncpy(obj_glob->name, obj->name, DFS_MAX_NAME); obj_glob->name[DFS_MAX_NAME] = 0; rc = dfs_get_chunk_size(obj, &obj_glob->chunk_size); if (rc) @@ -4593,7 +4596,7 @@ dfs_obj_global2local(dfs_t *dfs, int flags, d_iov_t glob, dfs_obj_t **_obj) oid_cp(&obj->oid, obj_glob->oid); oid_cp(&obj->parent_oid, obj_glob->parent_oid); - strncpy(obj->name, obj_glob->name, DFS_MAX_NAME + 1); + strncpy(obj->name, obj_glob->name, DFS_MAX_NAME); obj->name[DFS_MAX_NAME] = '\0'; obj->mode = obj_glob->mode; obj->flags = flags ? flags : obj_glob->flags; @@ -7428,3 +7431,4 @@ dfs_obj_fix_type(dfs_t *dfs, dfs_obj_t *parent, const char *name) D_FREE(entry.value); return rc; } +#pragma GCC diagnostic pop