[PATCH] Make Lck_AssertHeld trigger in the caller code
Dridi Boukelmoune
dridi at varni.sh
Thu Feb 25 15:49:12 CET 2016
Hi,
With Varnish locks available for VMODs in 4.1 I decided to convert my
plain pthread locks on my 4.1-only module. I even found a place where
I forgot a lock thanks to being able to assert on it being held :)
This patch aims at making this assertion a bit more useful:
Assert error in Lck__Assert(), cache/cache_lck.c line 175:
Condition(ilck->held) not true.
The backtrace doesn't mention static function names or line numbers,
so with the patch I got this instead:
Assert error in vmod_dns_del(), vmod_named.c line 231:
Condition(Lck__Held(&dir->mtx)) not true.
Best,
Dridi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-Lck_AssertHeld-trigger-in-the-caller-code.patch
Type: text/x-patch
Size: 2565 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20160225/5f8b4ceb/attachment.bin>
More information about the varnish-dev
mailing list