bugGNUstep - Bugs: bug #62176, 2 problems compiling gnustep-base

 
 

bug #62176: 2 problems compiling gnustep-base

Submitter:  Carl Hansen <carlh>
Submitted:  Sun 13 Mar 2022 08:18:23 AM UTC
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Mon 17 Oct 2022 09:59:58 PM UTC, comment #2: 

I see no errors, only warnings which may or may not legitimate. Do they cause issues for you?

Also, there is no information about operating system compiler and other details

Riccardo Mottola <rmottola>
Project Member
Mon 17 Oct 2022 09:59:49 PM UTC, comment #1: 

I don't understand what the error is here... I see warnings.   Are you getting a successful build?

original submission:

> averse to github
> Compiling file GSValue.m ...
> In function 'GSPrivateSockaddrPort',
>     inlined from 'GSPrivateSockaddrPort' at GSSocketStream.m:118:1,
>     inlined from '-[GSSocketStream propertyForKey:]' at GSSocketStream.m:1595:8:
> GSSocketStream.m:127:12: warning: array subscript 'struct sockaddr_in6[0]' is
> partly outside array bounds of 'struct sockaddr[1]' [-Warray-bounds]
>   127 |       port = addr6->sin6_port;
>       |       ~~~~~^~~~~~~~~~~~~~~~~~
> GSSocketStream.m: In function '-[GSSocketStream propertyForKey:]':
> GSSocketStream.m:1564:25: note: object 'sin' of size 16
>  1564 |       struct sockaddr   sin;
>       |                         ^~~
> In function 'GSPrivateSockaddrPort',
>     inlined from 'GSPrivateSockaddrPort' at GSSocketStream.m:118:1,
>     inlined from '-[GSSocketStream propertyForKey:]' at GSSocketStream.m:1580:8:
> GSSocketStream.m:127:12: warning: array subscript 'struct sockaddr_in6[0]' is
> partly outside array bounds of 'struct sockaddr[1]' [-Warray-bounds]
>   127 |       port = addr6->sin6_port;
>       |       ~~~~~^~~~~~~~~~~~~~~~~~
> GSSocketStream.m: In function '-[GSSocketStream propertyForKey:]':
> GSSocketStream.m:1564:25: note: object 'sin' of size 16
>  1564 |       struct sockaddr   sin;
>       |                         ^~~
>
>
>
> Compiling file NSMessagePort.m ...
> NSZone.m: In function 'NSCreateZone':
> NSZone.m:1652:13: warning: pointer 'zone' used after 'free' [-Wuse-after-free]
>  1652 |       block = zone->blocks;
>       |       ~~~~~~^~~~~~~~~~~~~~
> NSZone.m:1645:11: note: call to 'free' here
>  1645 |           free(zone);
>       |           ^~~~~~~~~~
> NSZone.m:1700:13: warning: pointer 'zone' used after 'free' [-Wuse-after-free]
>  1700 |       block = zone->blocks;
>       |       ~~~~~~^~~~~~~~~~~~~~
> NSZone.m:1695:11: note: call to 'free' here
>  1695 |           free(zone);
>       |           ^~~~~~~~~~
>  Compiling file NSMessagePortNameServer.m ...
>  Compiling file GSFFIInvocation.m ...
> NSMessagePort.m: In function 'newDataWithEncodedPort':
> NSMessagePort.m:199:3: warning: 'strncpy' offset 9 from the object at
> '<unknown>' is out of the bounds of referenced subobject 'addr' with type
> 'unsigned char[0]' at offset 9 [-Warray-bounds]
>   199 |   strncpy((char*)pi->addr, (char*)name, strlen((char*)name) + 1);
>       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> NSMessagePort.m:154:17: note: subobject 'addr' declared here
>   154 |   unsigned char addr[0];        /* name of the port on the local host  
> */
>       |                 ^~~~
> NSMessagePortNameServer.m: In function '+[NSMessagePortNameServer _livePort:]':
> NSMessagePortNameServer.m:398:7: warning: 'strncpy' output may be truncated
> copying 107 bytes from a string of length 511 [-Wstringop-truncation]
>   398 |       strncpy(sockAddr.sun_path, socket_path, sizeof(sockAddr.sun_path)
> - 1);
>       |      

Gregory John Casamento <gcasa>
Project Administrator
Sun 13 Mar 2022 08:18:23 AM UTC, original submission:  

averse to github
Compiling file GSValue.m ...
In function 'GSPrivateSockaddrPort',
    inlined from 'GSPrivateSockaddrPort' at GSSocketStream.m:118:1,
    inlined from '-[GSSocketStream propertyForKey:]' at GSSocketStream.m:1595:8:
GSSocketStream.m:127:12: warning: array subscript 'struct sockaddr_in6[0]' is
partly outside array bounds of 'struct sockaddr[1]' [-Warray-bounds]
  127 |       port = addr6->sin6_port;
      |       ~~~~~^~~~~~~~~~~~~~~~~~
GSSocketStream.m: In function '-[GSSocketStream propertyForKey:]':
GSSocketStream.m:1564:25: note: object 'sin' of size 16
 1564 |       struct sockaddr   sin;
      |                         ^~~
In function 'GSPrivateSockaddrPort',
    inlined from 'GSPrivateSockaddrPort' at GSSocketStream.m:118:1,
    inlined from '-[GSSocketStream propertyForKey:]' at GSSocketStream.m:1580:8:
GSSocketStream.m:127:12: warning: array subscript 'struct sockaddr_in6[0]' is
partly outside array bounds of 'struct sockaddr[1]' [-Warray-bounds]
  127 |       port = addr6->sin6_port;
      |       ~~~~~^~~~~~~~~~~~~~~~~~
GSSocketStream.m: In function '-[GSSocketStream propertyForKey:]':
GSSocketStream.m:1564:25: note: object 'sin' of size 16
 1564 |       struct sockaddr   sin;
      |                         ^~~

Compiling file NSMessagePort.m ...
NSZone.m: In function 'NSCreateZone':
NSZone.m:1652:13: warning: pointer 'zone' used after 'free' [-Wuse-after-free]
 1652 |       block = zone->blocks;
      |       ~~~~~~^~~~~~~~~~~~~~
NSZone.m:1645:11: note: call to 'free' here
 1645 |           free(zone);
      |           ^~~~~~~~~~
NSZone.m:1700:13: warning: pointer 'zone' used after 'free' [-Wuse-after-free]
 1700 |       block = zone->blocks;
      |       ~~~~~~^~~~~~~~~~~~~~
NSZone.m:1695:11: note: call to 'free' here
 1695 |           free(zone);
      |           ^~~~~~~~~~
 Compiling file NSMessagePortNameServer.m ...
 Compiling file GSFFIInvocation.m ...
NSMessagePort.m: In function 'newDataWithEncodedPort':
NSMessagePort.m:199:3: warning: 'strncpy' offset 9 from the object at
'<unknown>' is out of the bounds of referenced subobject 'addr' with type
'unsigned char[0]' at offset 9 [-Warray-bounds]
  199 |   strncpy((char*)pi->addr, (char*)name, strlen((char*)name) + 1);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NSMessagePort.m:154:17: note: subobject 'addr' declared here
  154 |   unsigned char addr[0];        /* name of the port on the local host  
*/
      |                 ^~~~
NSMessagePortNameServer.m: In function '+[NSMessagePortNameServer _livePort:]':
NSMessagePortNameServer.m:398:7: warning: 'strncpy' output may be truncated
copying 107 bytes from a string of length 511 [-Wstringop-truncation]
  398 |       strncpy(sockAddr.sun_path, socket_path, sizeof(sockAddr.sun_path)
- 1);
      |      

Carl Hansen <carlh>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rmottola (Posted a comment)
  • -email is unavailable- added by gcasa (Posted a comment)
  • -email is unavailable- added by carlh (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-17 rmottola StatusNone Need Info

    Back to the top


    Powered by Savane 3.9