intel / intel-graphics-compiler

Other
594 stars 155 forks source link

FTBFS with gcc-14 #337

Closed tjaalton closed 1 month ago

tjaalton commented 1 month ago

building 1.0.17384.4 on Debian unstable fails:

In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/c++allocator.h:33,
                 from /usr/include/c++/14/bits/allocator.h:46,
                 from /usr/include/c++/14/string:43,
                 from /usr/include/llvm-14/llvm/Pass.h:31,
                 from /<<PKGBUILDDIR>>/IGC/Compiler/Optimizer/MCSOptimization.hpp:11,
                 from /<<PKGBUILDDIR>>/IGC/Compiler/Optimizer/MCSOptimization.cpp:9:
In member function ‘void std::__new_allocator<_Tp>::deallocate(_Tp*, size_type) [with _Tp = llvm::LdmsInstrinsic*]’,
    inlined from ‘static void std::allocator_traits<std::allocator<_CharT> >::deallocate(allocator_type&, pointer, size_type) [with _Tp = llvm::LdmsInstrinsic*]’ at /usr/include/c++/14/bits/alloc_traits.h:513:23,
    inlined from ‘void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = llvm::LdmsInstrinsic*; _Alloc = std::allocator<llvm::LdmsInstrinsic*>]’ at /usr/include/c++/14/bits/stl_vector.h:389:19,
    inlined from ‘void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = llvm::LdmsInstrinsic*; _Alloc = std::allocator<llvm::LdmsInstrinsic*>]’ at /usr/include/c++/14/bits/stl_vector.h:385:7,
    inlined from ‘std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = llvm::LdmsInstrinsic*; _Alloc = std::allocator<llvm::LdmsInstrinsic*>]’ at /usr/include/c++/14/bits/stl_vector.h:368:15,
    inlined from ‘std::vector<_Tp, _Alloc>::~vector() [with _Tp = llvm::LdmsInstrinsic*; _Alloc = std::allocator<llvm::LdmsInstrinsic*>]’ at /usr/include/c++/14/bits/stl_vector.h:738:7,
    inlined from ‘void MCSOptimization::visitCallInst(llvm::CallInst&)’ at /<<PKGBUILDDIR>>/IGC/Compiler/Optimizer/MCSOptimization.cpp:265:17:
/usr/include/c++/14/bits/new_allocator.h:172:33: error: ‘void operator delete(void*, std::size_t)’ called on pointer ‘<unknown>’ with nonzero offset [9, 9223372036854775800] [-Werror=free-nonheap-object]
  172 |         _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n));
      |                                 ^
In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = llvm::LdmsInstrinsic*]’,
    inlined from ‘static _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = llvm::LdmsInstrinsic*]’ at /usr/include/c++/14/bits/alloc_traits.h:478:28,
    inlined from ‘std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = llvm::LdmsInstrinsic*; _Alloc = std::allocator<llvm::LdmsInstrinsic*>]’ at /usr/include/c++/14/bits/stl_vector.h:380:33,
    inlined from ‘std::vector<_Tp, _Alloc>::pointer std::vector<_Tp, _Alloc>::_M_allocate_and_copy(size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = __gnu_cxx::__normal_iterator<llvm::LdmsInstrinsic* const*, std::vector<llvm::LdmsInstrinsic*> >; _Tp = llvm::LdmsInstrinsic*; _Alloc = std::allocator<llvm::LdmsInstrinsic*>]’ at /usr/include/c++/14/bits/stl_vector.h:1621:40,
    inlined from ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = llvm::LdmsInstrinsic*; _Alloc = std::allocator<llvm::LdmsInstrinsic*>]’ at /usr/include/c++/14/bits/vector.tcc:238:44,
    inlined from ‘void MCSOptimization::visitCallInst(llvm::CallInst&)’ at /<<PKGBUILDDIR>>/IGC/Compiler/Optimizer/MCSOptimization.cpp:210:43:
/usr/include/c++/14/bits/new_allocator.h:151:55: note: returned from ‘void* operator new(std::size_t)’
  151 |         return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
      |                                                       ^
pszymich commented 1 month ago

Hi @tjaalton, what is the compiler and the compiler version?

edit: Missed the title. We'll check this shortly.

pszymich commented 1 month ago

Patched in https://github.com/intel/intel-graphics-compiler/commit/03a6d273e4897302531a69ced73e7b9b51b44a4d Thanks @bokrzesi @tjaalton