]> git.ipfire.org Git - thirdparty/systemd.git/commit
hashmap: add an explicit assert() for detecting when objects migrated between threads
authorLennart Poettering <lennart@poettering.net>
Fri, 3 Aug 2018 14:46:26 +0000 (16:46 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 3 Aug 2018 15:36:11 +0000 (17:36 +0200)
commit205c085bc36c2c61a09dc40621d8561b135d9b57
tree7a0878d90a585ede89adc618d2181ef2742c4e5f
parentb4f607433cac749b617e15b3d5d122322ed2bc71
hashmap: add an explicit assert() for detecting when objects migrated between threads

When clients don't follow protocol and use the same object from
different threads, then we previously would silently corrupt memory.
With this assert we'll fail with an assert(). This doesn't fix anything
but certainly makes mis-uses easier to detect and debug.

Triggered by https://bugzilla.redhat.com/show_bug.cgi?id=1609349
src/basic/hashmap.c