mapnik/test/standalone
Matt Amos 3d7b84a598 Fix deadlock in recursive datasource registration.
The datasource cache was taking an exclusive lock on the simple
mutex used to protect the singleton's data pointer. This works
okay when everyone always calls it non-recursively, but when the
recursive flag is true then it will always deadlock when called
on any directory with subdirectories.

Additionally, many methods which accessed private data members of
the cache were not protected by any locks.

Since the call pattern of registering datasources is strictly
tree-shaped then it's a good candidate for a recursive mutex. This
has a slightly higher overhead than a simple mutex, so rather than
change the singleton's mutex to be recursive, I've added a new
instance mutex to the datasource cache.

Also, added a very basic test which reproduces the problem and
shows that it's fixed with this patch.
2015-08-23 20:25:35 +01:00
..
agg_rasterizer_integer_overflow_test.cpp Test failure on thrown exception is already handled by the test framework. 2015-05-18 22:37:13 +01:00
csv_test.cpp fix odd inf loop in catch.hpp 2015-06-30 18:47:36 -07:00
datasource_registration_test.cpp Fix deadlock in recursive datasource registration. 2015-08-23 20:25:35 +01:00
font_registration_test.cpp fix paths for font_registration_test.cpp - refs #2787 2015-04-30 07:12:30 -07:00