Date: Wed, 03 Apr 2019 20:31:21 +0000 From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 236714] Clang problem with rctl(8) Message-ID: <bug-236714-29464-com01PqENS@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-236714-29464@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 --- Comment #12 from Mateusz Guzik <mjg@FreeBSD.org> --- It is not being ignored. There is non-zero garbage in an area not written to by sysctl, which makes the zero comparison fail. diff --git a/usr.bin/rctl/rctl.c b/usr.bin/rctl/rctl.c index 74073c13207e..8fb9e862aee8 100644 --- a/usr.bin/rctl/rctl.c +++ b/usr.bin/rctl/rctl.c @@ -378,12 +378,15 @@ print_rules(char *rules, int hflag, int nflag) static void enosys(void) { - int error, racct_enable; + int error, racct_enable = ~(0); size_t racct_enable_len; + + printf("%x\n", racct_enable); racct_enable_len = sizeof(racct_enable); error = sysctlbyname("kern.racct.enable", &racct_enable, &racct_enable_len, NULL, 0); + printf("%x\n", racct_enable); if (error != 0) { if (errno == ENOENT) Results in: ffffffff ffffff00 a.out: failed to show rules for '::': Function not implemented -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236714-29464-com01PqENS>
