Skip to content

Unable to build the _socket module #2

Description

@kmod

On Ubuntu 20.04, getting this error during the build:

$ gcc -pthread -fPIC -I. -fno-omit-frame-pointer -momit-leaf-frame-pointer -Wno-unused-result -Wsign-compare -Wno-cast-function-type -Wno-type-limits -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Werror -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I./ThirdParty/i386-dis -I. -I./Include -I./ThirdParty/fmt-6.1.1/include -I/usr/include/x86_64-linux-gnu -I/usr/local/include -I/home/kmod/cinder/Include -I/home/kmod/cinder -c /home/kmod/cinder/Modules/socketmodule.c -o build/temp.linux-x86_64-3.8/home/kmod/cinder/Modules/socketmodule.o
In file included from /usr/include/string.h:495,
                 from ./Include/Python.h:30,
                 from /home/kmod/cinder/Modules/socketmodule.c:103:
In function ‘memset’,
    inlined from ‘getsockaddrarg’ at /home/kmod/cinder/Modules/socketmodule.c:2301:9,
    inlined from ‘sock_bind’ at /home/kmod/cinder/Modules/socketmodule.c:3079:10:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:10: error: ‘__builtin_memset’ offset [17, 88] from the object at ‘addrbuf’ is out of the bounds of referenced subobject ‘sa’ with type ‘struct sockaddr’ at offset 0 [-Werror=array-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

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