summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2025-01-23 00:55:17 -0500
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2025-04-23 13:09:46 +0100
commit760121dcb1837fdee6ac7f4e2412c0d539fbff7a (patch)
tree4694aaa3ea905b0138633fa6f21122e0e91524c3 /.github
parent19067fe85a32a51703b7ed29626a30e00899007f (diff)
Fixed #35801 -- Prevented collision of senders with non-overlapping lifetimes.
As documented, the id() function can return the same value for distinct objects with non-overlapping lifetimes which can result in signals being sent to the wrong receivers if two distinct senders happen to have a colliding id() value. Since reproduction of the issue requires memory constrained circumstances where the same exact id() is reused for two senders of the same signal the test opt to simulate the collision by systematically making the same id for Sender instances. Note that we explicitly avoid keeping a strong reference to senders that cannot be weakly referenced as that would unexpectedly prevent them from being garbage collected. This means that id(sender) collisions could still occur for such objects but Django itself doesn't make use of them. Thanks Sjoerd Job Postmus for the reduced test case and Mariusz for the review. Co-authored-by: And Clover <and@doxdesk.com>
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions