Skip to content

SYCL Unittests build fail in SYCL Nightly #13737

@uditagarwal97

Description

@uditagarwal97

Describe the bug

Run: https://github.com/intel/llvm/actions/runs/9026632746/job/24804245927

tools/sycl/unittests/assert/CMakeFiles/AssertTests.dir/assert.cpp.o.d -o tools/sycl/unittests/assert/CMakeFiles/AssertTests.dir/assert.cpp.o -c /__w/llvm/llvm/src/sycl/unittests/assert/assert.cpp
In file included from /__w/llvm/llvm/src/sycl/unittests/assert/assert.cpp:31:
In member function 'void sycl::_V1::unittest::PiProperty::updateNativeType()',
    inlined from 'sycl::_V1::unittest::PiProperty::PiProperty(const std::string&, std::vector<char>, uint32_t)' at /__w/llvm/llvm/src/sycl/unittests/helpers/PiImage.hpp:33:21,
    inlined from 'void sycl::_V1::unittest::setKernelUsesAssert(const std::vector<std::__cxx11::basic_string<char> >&, PiPropertySet&)' at /__w/llvm/llvm/src/sycl/unittests/helpers/PiImage.hpp:395:20:
/__w/llvm/llvm/src/sycl/unittests/helpers/PiImage.hpp:57:28: error: array subscript 'uint32_t {aka unsigned int}[0]' is partly outside array bounds of 'char [2]' [-Werror=array-bounds]
   57 |                            *((uint32_t *)MData.data())};
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/12/bits/c++allocator.h:33,
                 from /usr/include/c++/12/bits/allocator.h:46,
                 from /usr/include/c++/12/string:41,
                 from /usr/include/c++/12/bits/locale_classes.h:40,
                 from /usr/include/c++/12/bits/ios_base.h:41,
                 from /usr/include/c++/12/ios:42,
                 from /usr/include/c++/12/ostream:38,
                 from /__w/llvm/llvm/build/include/sycl/backend_types.hpp:13,
                 from /__w/llvm/llvm/build/include/sycl/backend/opencl.hpp:11,
                 from /__w/llvm/llvm/src/sycl/unittests/assert/assert.cpp:24:
In member function '_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = char]',
    inlined from 'static _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = char]' at /usr/include/c++/12/bits/alloc_traits.h:464:28,
    inlined from 'std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = char; _Alloc = std::allocator<char>]' at /usr/include/c++/12/bits/stl_vector.h:378:33,
    inlined from 'void std::vector<_Tp, _Alloc>::_M_range_initialize(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const char*; _Tp = char; _Alloc = std::allocator<char>]' at /usr/include/c++/12/bits/stl_vector.h:1687:25,
    inlined from 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = char; _Alloc = std::allocator<char>]' at /usr/include/c++/12/bits/stl_vector.h:677:21,
    inlined from 'void sycl::_V1::unittest::setKernelUsesAssert(const std::vector<std::__cxx11::basic_string<char> >&, PiPropertySet&)' at /__w/llvm/llvm/src/sycl/unittests/helpers/PiImage.hpp:395:20:
/usr/include/c++/12/bits/new_allocator.h:137:55: note: object of size 2 allocated by 'operator new'
  137 |         return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));

To reproduce

DPC++ commit: 1a60087

Environment

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions