Bug 295800 - llvm 21.1.8 breaks buildworld with WITHOUT_INET6=yes in inetd.c
Summary: llvm 21.1.8 breaks buildworld with WITHOUT_INET6=yes in inetd.c
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.4-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-06-02 17:31 UTC by John Wehle
Modified: 2026-06-03 23:10 UTC (History)
1 user (show)

See Also:


Attachments
Patch to workaround issue. (1.10 KB, patch)
2026-06-02 17:31 UTC, John Wehle
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wehle 2026-06-02 17:31:38 UTC
Created attachment 271429 [details]
Patch to workaround issue.

Since the update to LLVM 21.1.8 doing a buildworld of stable/14 with WITHOUT_INET6=yes results in:

  /usr/src/usr.sbin/inetd/inetd.c:1377:44: error: variable 'nbuf2' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
 1377 |                                 rpcb_set(sep->se_rpc_prog, i, netid2, &n
buf2);
      |                                                                        ^
~~~~

In March (i.e. prior to llvm 21.1.8) buildworld worked fine.

With the attached patch the buildworld succeeds using llvm 21.1.8.

Strictly speaking given the original code of:

  struct netconfig *netid, *netid2 = NULL;
  ...
  #ifdef INET6
  ...
  #endif
  ...
  if (netid2) {
				rpcb_unset(sep->se_rpc_prog, i, netid2);
				rpcb_set(sep->se_rpc_prog, i, netid2, &nbuf2);
			}

It seems like the rpcb_set should be unreachable code with WITHOUT_INET6=yes so the llvm error is a false positive, however patching inetd was a quick fix.