mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
Workaround compiler bug that optimizes setting .free_pools
The .free_pools bitfield would not be set on some levels of optimizations - workaround the compiler bug by reordering the setting the .freepools in the initializer.
This commit is contained in:
@@ -725,13 +725,13 @@ dns_message_create(isc_mem_t *mctx, isc_mempool_t *namepool,
|
|||||||
.magic = DNS_MESSAGE_MAGIC,
|
.magic = DNS_MESSAGE_MAGIC,
|
||||||
.namepool = namepool,
|
.namepool = namepool,
|
||||||
.rdspool = rdspool,
|
.rdspool = rdspool,
|
||||||
|
.free_pools = (namepool == NULL && rdspool == NULL),
|
||||||
};
|
};
|
||||||
|
|
||||||
isc_mem_attach(mctx, &msg->mctx);
|
isc_mem_attach(mctx, &msg->mctx);
|
||||||
|
|
||||||
if (namepool == NULL && rdspool == NULL) {
|
if (msg->free_pools) {
|
||||||
dns_message_createpools(mctx, &msg->namepool, &msg->rdspool);
|
dns_message_createpools(mctx, &msg->namepool, &msg->rdspool);
|
||||||
msg->free_pools = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
msginit(msg);
|
msginit(msg);
|
||||||
|
Reference in New Issue
Block a user