Open
Description
Hi all, building rust-gpu on my machine and I'm getting these potential overflow warning checks thrown.
Let me know if there is anything else I can provide
On Fedora 41
Ryzen 9, 64gb of ram
Compiling wayland-protocols v0.32.8
Compiling calloop-wayland-source v0.3.0
Compiling wayland-cursor v0.31.10
Compiling wayland-protocols-wlr v0.3.8
Compiling wayland-protocols-plasma v0.3.8
Compiling smithay-client-toolkit v0.19.2
Compiling sctk-adwaita v0.10.1
Compiling winit v0.30.11
Compiling ash-window v0.13.0
Compiling vk-mem v0.4.0
warning: [email protected]: In file included from /usr/include/c++/14/algorithm:60,
warning: [email protected]: from spirv-tools/source/opt/ir_context.h:18,
warning: [email protected]: from spirv-tools/source/opt/amd_ext_to_khr.h:18,
warning: [email protected]: from spirv-tools/source/opt/amd_ext_to_khr.cpp:15:
warning: [email protected]: In static member function 'static _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = const unsigned int; _Up = unsigned int; bool _IsMove = false]',
warning: [email protected]: inlined from '_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = const unsigned int*; _OI = unsigned int*]' at /usr/include/c++/14/bits/stl_algobase.h:521:30,
warning: [email protected]: inlined from '_OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = const unsigned int*; _OI = unsigned int*]' at /usr/include/c++/14/bits/stl_algobase.h:548:42,
warning: [email protected]: inlined from '_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = const unsigned int*; _OI = unsigned int*]' at /usr/include/c++/14/bits/stl_algobase.h:555:31,
warning: [email protected]: inlined from '_OI std::copy(_II, _II, _OI) [with _II = const unsigned int*; _OI = unsigned int*]' at /usr/include/c++/14/bits/stl_algobase.h:651:7,
warning: [email protected]: inlined from 'static _ForwardIterator std::__uninitialized_copy<true>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const unsigned int*; _ForwardIterator = unsigned int*]' at /usr/include/c++/14/bits/stl_uninitialized.h:147:27,
warning: [email protected]: inlined from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const unsigned int*; _ForwardIterator = unsigned int*]' at /usr/include/c++/14/bits/stl_uninitialized.h:185:15,
warning: [email protected]: inlined from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = const unsigned int*; _ForwardIterator = unsigned int*; _Tp = unsigned int]' at /usr/include/c++/14/bits/stl_uninitialized.h:373:37,
warning: [email protected]: inlined from 'void std::vector<_Tp, _Alloc>::_M_range_initialize_n(_Iterator, _Iterator, size_type) [with _Iterator = const unsigned int*; _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]' at /usr/include/c++/14/bits/stl_vector.h:1719:37:
warning: [email protected]: /usr/include/c++/14/bits/stl_algobase.h:452:30: error: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing between 5 and 9223372036854775807 bytes into a region of size 4 [-Werror=stringop-overflow=]
warning: [email protected]: 452 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
warning: [email protected]: | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: [email protected]: In file included from /usr/include/c++/14/x86_64-redhat-linux/bits/c++allocator.h:33,
warning: [email protected]: from /usr/include/c++/14/bits/allocator.h:46,
warning: [email protected]: from /usr/include/c++/14/string:43,
warning: [email protected]: from /usr/include/c++/14/bits/locale_classes.h:40,
warning: [email protected]: from /usr/include/c++/14/bits/ios_base.h:41,
warning: [email protected]: from /usr/include/c++/14/ios:44,
warning: [email protected]: from /usr/include/c++/14/ostream:40,
warning: [email protected]: from /usr/include/c++/14/iostream:41,
warning: [email protected]: from spirv-tools/source/opt/ir_context.h:19:
warning: [email protected]: In member function '_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = unsigned int]',
warning: [email protected]: inlined from 'static _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = unsigned int]' at /usr/include/c++/14/bits/alloc_traits.h:515:28,
warning: [email protected]: inlined from 'std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]' at /usr/include/c++/14/bits/stl_vector.h:383:33,
warning: [email protected]: inlined from 'void std::vector<_Tp, _Alloc>::_M_range_initialize_n(_Iterator, _Iterator, size_type) [with _Iterator = const unsigned int*; _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]' at /usr/include/c++/14/bits/stl_vector.h:1716:23:
warning: [email protected]: /usr/include/c++/14/bits/new_allocator.h:151:55: note: destination object of size 4 allocated by 'operator new'
warning: [email protected]: 151 | return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
warning: [email protected]: | ^
warning: [email protected]: cc1plus: all warnings being treated as errors
warning: [email protected]: ToolExecError: command did not execute successfully (status code exit status: 1): LC_ALL="C" "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "spirv-tools/" "-I" "spirv-tools/include" "-I" "generated/" "-I" "spirv-headers/include" "-I" "spirv-headers/include/spirv/unified1" "-Wall" "-Wextra" "-Wall" "-Wextra" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Werror" "-std=c++17" "-fno-exceptions" "-fno-rtti" "-Wno-long-long" "-Wshadow" "-Wundef" "-Wconversion" "-Wno-sign-conversion" "-Wno-deprecated-declarations" "-DSPIRV_CHECK_CONTEXT" "-DSPIRV_LINUX" "-o" "/home/marios/proj/hestia_vk/rtd/target/debug/build/spirv-tools-sys-d85fd6ab27473ff0/out/942b8c9adc6a33b2-amd_ext_to_khr.o" "-c" "spirv-tools/source/opt/amd_ext_to_khr.cpp"
error: failed to run custom build command for `spirv-tools-sys v0.9.0`
Caused by:
process didn't exit successfully: `/home/marios/proj/hestia_vk/rtd/target/debug/build/spirv-tools-sys-6e957bbae9995860/build-script-build` (exit status: 1)
--- stdout
OPT_LEVEL = Some(3)
OUT_DIR = Some(/home/marios/proj/hestia_vk/rtd/target/debug/build/spirv-tools-sys-d85fd6ab27473ff0/out)
TARGET = Some(x86_64-unknown-linux-gnu)
HOST = Some(x86_64-unknown-linux-gnu)
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
CC_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
CC_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some(true)
CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
CFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
CFLAGS_x86_64-unknown-linux-gnu = None
CARGO_ENCODED_RUSTFLAGS = Some()
cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
CXX_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
CXX_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CXX
HOST_CXX = None
cargo:rerun-if-env-changed=CXX
CXX = None
cargo:rerun-if-env-changed=CXXFLAGS
CXXFLAGS = None
cargo:rerun-if-env-changed=HOST_CXXFLAGS
HOST_CXXFLAGS = None
cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
CXXFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
CXXFLAGS_x86_64-unknown-linux-gnu = None
cargo:warning=In file included from /usr/include/c++/14/algorithm:60,
cargo:warning= from spirv-tools/source/opt/ir_context.h:18,
cargo:warning= from spirv-tools/source/opt/amd_ext_to_khr.h:18,
cargo:warning= from spirv-tools/source/opt/amd_ext_to_khr.cpp:15:
cargo:warning=In static member function 'static _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = const unsigned int; _Up = unsigned int; bool _IsMove = false]',
cargo:warning= inlined from '_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = const unsigned int*; _OI = unsigned int*]' at /usr/include/c++/14/bits/stl_algobase.h:521:30,
cargo:warning= inlined from '_OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = const unsigned int*; _OI = unsigned int*]' at /usr/include/c++/14/bits/stl_algobase.h:548:42,
cargo:warning= inlined from '_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = const unsigned int*; _OI = unsigned int*]' at /usr/include/c++/14/bits/stl_algobase.h:555:31,
cargo:warning= inlined from '_OI std::copy(_II, _II, _OI) [with _II = const unsigned int*; _OI = unsigned int*]' at /usr/include/c++/14/bits/stl_algobase.h:651:7,
cargo:warning= inlined from 'static _ForwardIterator std::__uninitialized_copy<true>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const unsigned int*; _ForwardIterator = unsigned int*]' at /usr/include/c++/14/bits/stl_uninitialized.h:147:27,
cargo:warning= inlined from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const unsigned int*; _ForwardIterator = unsigned int*]' at /usr/include/c++/14/bits/stl_uninitialized.h:185:15,
cargo:warning= inlined from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = const unsigned int*; _ForwardIterator = unsigned int*; _Tp = unsigned int]' at /usr/include/c++/14/bits/stl_uninitialized.h:373:37,
cargo:warning= inlined from 'void std::vector<_Tp, _Alloc>::_M_range_initialize_n(_Iterator, _Iterator, size_type) [with _Iterator = const unsigned int*; _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]' at /usr/include/c++/14/bits/stl_vector.h:1719:37:
cargo:warning=/usr/include/c++/14/bits/stl_algobase.h:452:30: error: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing between 5 and 9223372036854775807 bytes into a region of size 4 [-Werror=stringop-overflow=]
cargo:warning= 452 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
cargo:warning= | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=In file included from /usr/include/c++/14/x86_64-redhat-linux/bits/c++allocator.h:33,
cargo:warning= from /usr/include/c++/14/bits/allocator.h:46,
cargo:warning= from /usr/include/c++/14/string:43,
cargo:warning= from /usr/include/c++/14/bits/locale_classes.h:40,
cargo:warning= from /usr/include/c++/14/bits/ios_base.h:41,
cargo:warning= from /usr/include/c++/14/ios:44,
cargo:warning= from /usr/include/c++/14/ostream:40,
cargo:warning= from /usr/include/c++/14/iostream:41,
cargo:warning= from spirv-tools/source/opt/ir_context.h:19:
cargo:warning=In member function '_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = unsigned int]',
cargo:warning= inlined from 'static _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = unsigned int]' at /usr/include/c++/14/bits/alloc_traits.h:515:28,
cargo:warning= inlined from 'std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]' at /usr/include/c++/14/bits/stl_vector.h:383:33,
cargo:warning= inlined from 'void std::vector<_Tp, _Alloc>::_M_range_initialize_n(_Iterator, _Iterator, size_type) [with _Iterator = const unsigned int*; _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]' at /usr/include/c++/14/bits/stl_vector.h:1716:23:
cargo:warning=/usr/include/c++/14/bits/new_allocator.h:151:55: note: destination object of size 4 allocated by 'operator new'
cargo:warning= 151 | return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
cargo:warning= | ^
cargo:warning=cc1plus: all warnings being treated as errors
exit status: 1
cargo:warning=ToolExecError: command did not execute successfully (status code exit status: 1): LC_ALL="C" "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "spirv-tools/" "-I" "spirv-tools/include" "-I" "generated/" "-I" "spirv-headers/include" "-I" "spirv-headers/include/spirv/unified1" "-Wall" "-Wextra" "-Wall" "-Wextra" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Werror" "-std=c++17" "-fno-exceptions" "-fno-rtti" "-Wno-long-long" "-Wshadow" "-Wundef" "-Wconversion" "-Wno-sign-conversion" "-Wno-deprecated-declarations" "-DSPIRV_CHECK_CONTEXT" "-DSPIRV_LINUX" "-o" "/home/marios/proj/hestia_vk/rtd/target/debug/build/spirv-tools-sys-d85fd6ab27473ff0/out/942b8c9adc6a33b2-amd_ext_to_khr.o" "-c" "spirv-tools/source/opt/amd_ext_to_khr.cpp"
--- stderr
error occurred in cc-rs: command did not execute successfully (status code exit status: 1): LC_ALL="C" "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "spirv-tools/" "-I" "spirv-tools/include" "-I" "generated/" "-I" "spirv-headers/include" "-I" "spirv-headers/include/spirv/unified1" "-Wall" "-Wextra" "-Wall" "-Wextra" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Werror" "-std=c++17" "-fno-exceptions" "-fno-rtti" "-Wno-long-long" "-Wshadow" "-Wundef" "-Wconversion" "-Wno-sign-conversion" "-Wno-deprecated-declarations" "-DSPIRV_CHECK_CONTEXT" "-DSPIRV_LINUX" "-o" "/home/marios/proj/hestia_vk/rtd/target/debug/build/spirv-tools-sys-d85fd6ab27473ff0/out/942b8c9adc6a33b2-amd_ext_to_khr.o" "-c" "spirv-tools/source/opt/amd_ext_to_khr.cpp"
Metadata
Metadata
Assignees
Labels
No labels