Skip to content

‘spvTextToBinaryInternal’ attemps to allocate size ‘18446744073709551615’ according to GCC 15 #6541

@LDAP

Description

@LDAP

Compiling the project on g++ (GCC) 15.2.1 20260103 with LTO enabled leads to an error:

../subprojects/spirv-tools/source/text.cpp: In function ‘spvTextToBinaryInternal’:
../subprojects/spirv-tools/source/text.cpp:934:42: error: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
  934 |   uint32_t* data = new uint32_t[totalSize];
      |                                          ^
/usr/include/c++/15.2.1/new:140:26: note: in a call to allocation function ‘operator new []’ declared here
  140 | _GLIBCXX_NODISCARD void* operator new[](std::size_t)
      |                          ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions