Merge branch '521-align-cmsg-buffers-v9_11' into 'v9_11'

(v9_11) Resolve "BIND 9.11.4 terminates with SIGBUS error when compiled with Oracle Developer Studio 12.6"

See merge request isc-projects/bind9!769
This commit is contained in:
Ondřej Surý 2018-09-07 04:39:21 -04:00
commit 76d034c512
3 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,6 @@
5030. [bug] Align CMSG buffers to a 64-bit boundary, fixes crash
on architectures with strict alignment. [GL #521]
5028. [bug] Spread the initial RRSIG expiration times over the
entire working sig-validity-interval when signing a
zone in named to even out re-signing and transfer

View file

@ -234,6 +234,11 @@
*/
#define TIME_NOW(tp) RUNTIME_CHECK(isc_time_now((tp)) == ISC_R_SUCCESS)
/*%
* Alignment
*/
#define ALIGN(x, a) (((x) + (a) - 1) & ~((typeof(x))(a)-1))
/*%
* Misc
*/

View file

@ -347,8 +347,9 @@ typedef isc_event_t intev_t;
#define CMSG_SP_INT 24
#define RECVCMSGBUFLEN (2*(CMSG_SP_IN6PKT + CMSG_SP_TIMESTAMP + CMSG_SP_TCTOS)+1)
#define SENDCMSGBUFLEN (2*(CMSG_SP_IN6PKT + CMSG_SP_INT + CMSG_SP_TCTOS)+1)
/* Align cmsg buffers to be safe on SPARC etc. */
#define RECVCMSGBUFLEN ALIGN(2*(CMSG_SP_IN6PKT + CMSG_SP_TIMESTAMP + CMSG_SP_TCTOS)+1, sizeof(void*))
#define SENDCMSGBUFLEN ALIGN(2*(CMSG_SP_IN6PKT + CMSG_SP_INT + CMSG_SP_TCTOS)+1, sizeof(void*))
/*%
* The number of times a send operation is repeated if the result is EINTR.