Description: fix segfault of svc.configd on amd64 Both arguments of P2ROUNDUP must be of the same width. "x" used to be uint32_t (4 bytes), but sizeof() returns size_t which is 8 bytes on amd64. This gives *very* large pointer value :-). The first argument must be casted too, because libscf uses assert() with size_t type (in usr/src/lib/libscf/common/lowlevel.c). . See https://blogs.oracle.com/jwadams/entry/macros_and_powers_of_two Bug-Dyson: http://osdyson.org/issues/92 Index: svc.configd/usr/src/common/svc/repcache_protocol.h =================================================================== --- svc.configd.orig/usr/src/common/svc/repcache_protocol.h 2012-10-08 00:25:35.000000000 +0000 +++ svc.configd/usr/src/common/svc/repcache_protocol.h 2013-01-23 01:57:07.372878733 +0000 @@ -761,7 +761,7 @@ #define REP_PROTOCOL_TRANSACTION_CMD_MIN_SIZE \ REP_PROTOCOL_TRANSACTION_CMD_SIZE(0) -#define TX_SIZE(x) P2ROUNDUP((x), sizeof (uint32_t)) +#define TX_SIZE(x) P2ROUNDUP_TYPED((x), sizeof(uint32_t), uint32_t) struct rep_protocol_transaction_request { enum rep_protocol_requestid rpr_request; /* SETUP, ABORT or TEARDOWN */