Skip to content

Commit

Permalink
DAOS-15799 build: Add libsanitize
Browse files Browse the repository at this point in the history
Update default SCons options to generate RPMs with code instrumented
with libasan.
Miscellaneous fixes for building with CI.

Skip-test: true
Required-githooks: true

Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@intel.com>
  • Loading branch information
kanard38 authored and knard-intel committed Jun 6, 2024
1 parent 855d80e commit 31f3d39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions site_scons/prereq_tools/base.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion site_scons/site_tools/compiler_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions src/client/dfs/dfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2917,7 +2917,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;
Expand All @@ -2934,7 +2934,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;
Expand Down

0 comments on commit 31f3d39

Please sign in to comment.