Bug 13545 - Fix CTDB compilation issues
Fix CTDB compilation issues
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: CTDB
4.9.0rc1
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-07-26 09:17 UTC by Martin Schwenke
Modified: 2018-07-31 16:36 UTC (History)
2 users (show)

See Also:


Attachments
Patches for 4.9.x (3.21 KB, patch)
2018-07-30 03:55 UTC, Amitay Isaacs
martins: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schwenke 2018-07-26 09:17:21 UTC
There is some new strncpy() checking in gcc 8.1 that is enabled when configuring with --picky-developer and compiling with -O3.  For example:

../common/system_socket.c: In function ‘parse_ip_mask’:
../common/system_socket.c:229:2: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
  strncpy(s, str, len+1);
  ^~~~~~~~~~~~~~~~~~~~~~
../common/system_socket.c:223:8: note: length computed here
  len = strlen(str);
        ^~~~~~~~~~~
Comment 1 Amitay Isaacs 2018-07-30 03:55:13 UTC
Created attachment 14366 [details]
Patches for 4.9.x
Comment 2 Martin Schwenke 2018-07-30 06:05:56 UTC
Hi Karolin,

This is ready for 4.9.

Thanks...
Comment 3 Karolin Seeger 2018-07-31 10:30:06 UTC
Pushed to autobuild-v4-9-test.
Comment 4 Karolin Seeger 2018-07-31 16:36:33 UTC
(In reply to Karolin Seeger from comment #3)
Pushed to v4-9-test.
Closing out bug report.

Thanks!