-
Notifications
You must be signed in to change notification settings - Fork 112
Closed
Labels
Milestone
Description
#~/.conan/data/corrade/v2020.06/conan/stable/build/#a588aedb50aa745a2698801b1f638aec5f70dbcd/src/Corrade/Containers/#GrowableArray.h:943:22: runtime error: null pointer passed as argument 2, which is #declared to never be null
#/usr/include/string.h:43:28: note: nonnull attribute specified here
#SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ~/.conan/data/#corrade/v2020.06/conan/stable/build/a588aedb50aa745a2698801b1f638aec5f70dbcd/src/#Corrade/Containers/GrowableArray.h:943:22 in
#~/.conan/data/corrade/v2020.06/conan/stable/build/#a588aedb50aa745a2698801b1f638aec5f70dbcd/src/Corrade/Containers/#GrowableArray.h:943:22: runtime error: null pointer passed as argument 2, which is #declared to never be null
#/usr/include/string.h:43:28: note: nonnull attribute specified here
#SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ~/.conan/data/#corrade/v2020.06/conan/stable/build/a588aedb50aa745a2698801b1f638aec5f70dbcd/src/#Corrade/Containers/GrowableArray.h:943:22 in
#~/.conan/data/corrade/v2020.06/conan/stable/build/#a588aedb50aa745a2698801b1f638aec5f70dbcd/src/Corrade/Containers/#GrowableArray.h:943:22: runtime error: null pointer passed as argument 2, which is #declared to never be null
#/usr/include/string.h:43:28: note: nonnull attribute specified here
#SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ~/.conan/data/#corrade/v2020.06/conan/stable/build/a588aedb50aa745a2698801b1f638aec5f70dbcd/src/#Corrade/Containers/GrowableArray.h:943:22 in
#~/.conan/data/corrade/v2020.06/conan/stable/build/#a588aedb50aa745a2698801b1f638aec5f70dbcd/src/Corrade/Containers/#GrowableArray.h:943:22: runtime error: null pointer passed as argument 2, which is #declared to never be null
#/usr/include/string.h:43:28: note: nonnull attribute specified here
#SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ~/.conan/data/#corrade/v2020.06/conan/stable/build/a588aedb50aa745a2698801b1f638aec5f70dbcd/src/#Corrade/Containers/GrowableArray.h:943:22 in
#~/.conan/data/corrade/v2020.06/conan/stable/build/#a588aedb50aa745a2698801b1f638aec5f70dbcd/src/Corrade/Containers/#GrowableArray.h:943:22: runtime error: null pointer passed as argument 2, which is #declared to never be null
#/usr/include/string.h:43:28: note: nonnull attribute specified here
#SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ~/.conan/data/#corrade/v2020.06/conan/stable/build/a588aedb50aa745a2698801b1f638aec5f70dbcd/src/#Corrade/Containers/GrowableArray.h:943:22 inTo get error build with clang and -fsanitize=address,undefined
-DMEMORY_TOOL_REPLACES_ALLOCATOR=1
-D_FORTIFY_SOURCE=0
-DUNDEFINED_SANITIZER=1
-DUNDEFINED_BEHAVIOR_SANITIZER=1
-g -O0
-fPIC
-fno-optimize-sibling-calls
-fno-omit-frame-pointer
-fno-stack-protector
-fno-wrapv
-fno-sanitize-recover=all
-fsanitize-recover=unsigned-integer-overflow
-fsanitize=address,undefined
-fsanitize-trap=undefined
-fsanitize=float-divide-by-zero
-fno-sanitize=vptr
-fsanitize=nullability-arg
-fsanitize=nullability-assign
-fsanitize=nullability-returnmemcpy uses __nonnull:
extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
size_t __n) __THROW __nonnull ((1, 2));NOTE: -fsanitize may require instrumented libc++, see conanfile.py in https://github.com/blockspacer/llvm_tools as example how to build instrumented libc++
Possible fix:
if(count*sizeof(T) != NULL) // take care of nonnull attribute
{
std::memcpy(dst, src, count*sizeof(T));
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Projects
Status
Done