mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +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,
|
||||
.namepool = namepool,
|
||||
.rdspool = rdspool,
|
||||
.free_pools = (namepool == NULL && rdspool == NULL),
|
||||
};
|
||||
|
||||
isc_mem_attach(mctx, &msg->mctx);
|
||||
|
||||
if (namepool == NULL && rdspool == NULL) {
|
||||
if (msg->free_pools) {
|
||||
dns_message_createpools(mctx, &msg->namepool, &msg->rdspool);
|
||||
msg->free_pools = true;
|
||||
}
|
||||
|
||||
msginit(msg);
|
||||
|
Reference in New Issue
Block a user