On a 9.0-CURRENT machine, amd64, we have: /usr/include/machine/signal.h:typedef long sig_atomic_t; This is 64-bit. At the same time we have: /usr/include/machine/_stdint.h:#define SIG_ATOMIC_MIN INT32_MIN /usr/include/machine/_stdint.h:#define SIG_ATOMIC_MAX INT32_MAX Which is 32-bit. Fix: Initially I thought we may want to adjust SIG_ATOMIC_MIN and SIG_ATOMIC_MAX, but really, who need sig_atomic_t to be 64-bit? (Linux does not, for what it's worth.) In any case, having a type that is larger than the values it can take like this is something we should be able to avoid. At a minimum it's inconsistent. How-To-Repeat: Run GCC's C testsuite and notice a number of C conformance tests around stdint fail: FAIL: gcc.dg/c99-stdint-1.c (test for excess errors) FAIL: gcc.dg/c99-stdint-2.c (test for excess errors) FAIL: gcc.dg/c99-stdint-5.c (test for excess errors) FAIL: gcc.dg/c99-stdint-6.c (test for excess errors)
32-bit vs 64-bit seems to be reversed here... -- Andriy Gapon
On Wed, 1 Sep 2010, Andriy Gapon wrote: > 32-bit vs 64-bit seems to be reversed here... Yes, you're absolutely right. I noticed this after submitting the PR and fixed it in GNATS, but the mails already had gone out of course. My bad. Gerald
----- Forwarded message from John Baldwin <jhb@freebsd.org> ----- From: John Baldwin <jhb@freebsd.org> To: freebsd-amd64@freebsd.org, Andriy Gapon <avg@icyb.net.ua> Cc: bde@freebsd.org Subject: Re: amd64/150170: SIG_ATOMIC_MIN/SIG_ATOMIC_MAX 32-bit when sig_atomic_t is 64-bit > 32-bit vs 64-bit seems to be reversed here... Yes, but we should still fix this one way or another. I was surprised recently when I found that sig_atomic_t was long on amd64. Perhaps Bruce (cc'd) knows which way it should be fixed? -- John Baldwin _______________________________________________ freebsd-amd64@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-amd64 To unsubscribe, send any mail to "freebsd-amd64-unsubscribe@freebsd.org" ----- End forwarded message -----
This PR: http://www.FreeBSD.org/cgi/query-pr.cgi?pr=amd64/150170 seems to be a duplicate of: kern/145590: [kernel] [[patch] SIG_ATOMIC_{MIN,MAX} does not match sig_atomic_t on 64-bit archs http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/145590 Regards, b.
See also kern/145590.
State Changed From-To: open->closed Duplicate of kern/145590.