mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-05 09:05:40 +00:00
[9.20] fix: dev: Use CMM_{STORE,LOAD}_SHARED to store/load glue in gluelist
ThreadSanitizer has trouble understanding that gluelist->glue is constant after it is assigned to the slabheader with cmpxchg. Help ThreadSanitizer to understand the code by using CMM_STORE_SHARED and CMM_LOAD_SHARED on gluelist->glue. Backport of MR !9929 Merge branch 'backport-ondrej/hint-tsan-in-addglue-9.20' into 'bind-9.20' See merge request isc-projects/bind9!9936
This commit is contained in:
@@ -1403,7 +1403,7 @@ create_gluelist(dns_db_t *db, dns_dbversion_t *dbversion, dns_dbnode_t *dbnode,
|
||||
|
||||
(void)dns_rdataset_additionaldata(rdataset, dns_rootname, add, &ctx);
|
||||
|
||||
gluelist->glue = ctx.glue;
|
||||
CMM_STORE_SHARED(gluelist->glue, ctx.glue);
|
||||
|
||||
return gluelist;
|
||||
}
|
||||
@@ -1450,7 +1450,7 @@ dns__db_addglue(dns_db_t *db, dns_dbversion_t *dbversion,
|
||||
}
|
||||
}
|
||||
|
||||
glue = gluelist->glue;
|
||||
glue = CMM_LOAD_SHARED(gluelist->glue);
|
||||
|
||||
if (glue != NULL) {
|
||||
addglue_to_message(glue, msg);
|
||||
|
Reference in New Issue
Block a user