Skip to content

void* __builtin_memset(void*, int, long unsigned int)’ offset [33, 40] from the object at ‘onnx::_TensorProto_Segment_default_instance_’ is out of the bounds of referenced subobject ‘onnx::TensorProto_Segment::begin_’ with type ‘long int’ at offset 24 [-Werror=array-bounds] 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest)); #39

@hygxy

Description

@hygxy
cmake -DCMAKE_BUILD_TYPE=Release .. 
make onnx2c

leads to the following error:

In function ‘void* memset(void*, int, size_t)’,
    inlined from ‘void onnx::TensorProto_Segment::SharedCtor()’ at /home/test/onnx2c/build/onnx.pb.cc:4176:11,
    inlined from ‘onnx::TensorProto_Segment::TensorProto_Segment()’ at /home/test/onnx2c/build/onnx.pb.cc:4161:13,
    inlined from ‘void InitDefaultsscc_info_TensorProto_Segment_onnx_2eproto()’ at /home/test/onnx2c/build/onnx.pb.cc:4159:1:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [33, 40] from the object at ‘onnx::_TensorProto_Segment_default_instance_’ is out of the bounds of referenced subobject ‘onnx::TensorProto_Segment::begin_’ with type ‘long int’ at offset 24 [-Werror=array-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
make[3]: *** [CMakeFiles/onnx2c_lib.dir/build.make:167: CMakeFiles/onnx2c_lib.dir/onnx.pb.cc.o] Error 1
make[3]: *** Waiting for unfinished jobs....
[ 50%] Building C object cmake_timestamp/CMakeFiles/timestamp.dir/timestamp.c.o
[ 50%] Built target timestamp
make[2]: *** [CMakeFiles/Makefile2:1228: CMakeFiles/onnx2c_lib.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1262: CMakeFiles/onnx2c.dir/rule] Error 2
make: *** [Makefile:192: onnx2c] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions