Skip to content

Compilation failed with _FORTIFY_SOURCE support for inet_ntop in glibc #18575

@nuqleo

Description

@nuqleo

Description

FRR compilation failed after recent changes in glibc

https://sourceware.org/git/?p=glibc.git;a=commit;h=090dfa40a5e46f7c0e4d6e8369bcbbd51267625f

Version

10.2 and 1.3

How to reproduce

Try to compile with latest glibc snapshot (Fedora Rawhide glibc-2.41.9000-7.fc43)

Expected behavior

Complilation without errors.

Actual behavior

In function 'inet_ntop',
    inlined from 'inet_sutop' at lib/sockunion.c:23:3:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'inet_sutop' at lib/sockunion.c:26:3:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'sockunion2str' at lib/sockunion.c:69:10:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'sockunion2str' at lib/sockunion.c:71:10:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'sockunion_log.constprop' at lib/sockunion.c:109:10:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'sockunion_log.constprop' at lib/sockunion.c:112:10:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'printfrr_psu' at lib/sockunion.c:681:3,
    inlined from 'printfrr_psu' at lib/sockunion.c:648:16:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'printfrr_psu' at lib/sockunion.c:689:3,
    inlined from 'printfrr_psu' at lib/sockunion.c:648:16:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
make[2]: *** [/tmp/ccb1fza2.mk:22: /tmp/ccIwI3rQ.ltrans10.ltrans.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In function 'inet_ntop',
    inlined from 'snprintf_seg6_segs' at lib/srv6.c:67:3:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'nexthop_vty_helper' at lib/nexthop.c:1418:3:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
make[2]: *** [/tmp/ccb1fza2.mk:14: /tmp/ccIwI3rQ.ltrans6.ltrans.o] Error 1
In function 'inet_ntop',
    inlined from 'prefix2str' at lib/prefix.c:1086:3:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'prefixevpn_ead2str' at lib/prefix.c:970:2,
    inlined from 'prefixevpn2str' at lib/prefix.c:1059:10,
    inlined from 'prefix2str' at lib/prefix.c:1112:3:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'prefixevpn_macip2str' at lib/prefix.c:994:3,
    inlined from 'prefixevpn2str' at lib/prefix.c:1061:10,
    inlined from 'prefix2str' at lib/prefix.c:1112:3:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'prefixevpn_imet2str' at lib/prefix.c:1013:2,
    inlined from 'prefixevpn2str' at lib/prefix.c:1063:10,
    inlined from 'prefix2str' at lib/prefix.c:1112:3:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'prefixevpn_es2str' at lib/prefix.c:1030:2,
    inlined from 'prefixevpn2str' at lib/prefix.c:1065:10,
    inlined from 'prefix2str' at lib/prefix.c:1112:3:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'prefixevpn_prefix2str' at lib/prefix.c:1046:2,
    inlined from 'prefixevpn2str' at lib/prefix.c:1067:10,
    inlined from 'prefix2str' at lib/prefix.c:1112:3:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'prefix_mcast_inet4_dump' at lib/prefix.c:1164:8:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'ipaddr2str' at lib/ipaddr.h:92:3,
    inlined from 'printfrr_ia' at lib/prefix.c:1565:2:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'printfrr_i4' at lib/prefix.c:1588:2:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'printfrr_i6' at lib/prefix.c:1611:2:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'prefixhost2str' at lib/prefix.c:1144:3,
    inlined from 'printfrr_pfx' at lib/prefix.c:1630:10:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
make[2]: *** [/tmp/ccb1fza2.mk:18: /tmp/ccIwI3rQ.ltrans8.ltrans.o] Error 1
In function 'inet_ntop',
    inlined from 'yang_data_new_ipv4' at lib/yang_wrappers.c:817:8:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'yang_data_new_ipv6' at lib/yang_wrappers.c:899:8:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'ipaddr2str' at lib/ipaddr.h:92:3,
    inlined from 'yang_data_new_ip' at lib/yang_wrappers.c:982:2:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'zapi_nexthop2str' at lib/zclient.c:2311:3:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^
In function 'inet_ntop',
    inlined from 'zapi_nexthop2str' at lib/zclient.c:2316:3:
/usr/include/bits/inet-fortified.h:29:1: error: inlining failed in call to 'always_inline' 'inet_ntop': function body can be overwritten at link time
   29 | __NTH (inet_ntop (int __af,
      | ^
/usr/include/bits/inet-fortified.h:36:10: note: called from here
   36 |   return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
      |          ^

Additional context

No response

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.

Metadata

Metadata

Assignees

Labels

triageNeeds further investigation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions