Bug #1270
Using libexiv2.a/.lib in multhreaded app segfaults.
100%
Description
I have a client that is using exiv2 as a library for their app and requires it to run multi-threaded. When launching several threads to access a tiff image the application will crash or segfault.
To reproduce run mt-test from the samples directory and have it access 10 or more tiff files. In my tests opening two to twenty images cause the issues, i used ReageanLargeTiff.tiff to test with in Linux and MacOS.
I am including a patch that resolves their issues and adds support for c++11 as well as switching between auto_ptr and unique_ptr depending if we are compiling with c++98 or c++11. This patch also adds a verbosity option when compiling to display more information. The patch sets the default to c++11 when compiling. This patch also adds a multi-thread test (mt-test.sh).
The current patch is only for CMake. Autoconf and the other build systems have yet to be modified to incorporate those changes.
Files
Related issues
History
Updated by Ben Touchette almost 5 years ago
- File autoconf.diff autoconf.diff added
Addendum:
Adding autoconf patch to support switch between c++11 and the previous c++ standards behavior.
Adds --disable-stdcpp11 switch to the configure script.
Behavior is in line with CMake patch.
Updated by Robin Mills almost 5 years ago
- Category set to build
- Status changed from New to Assigned
- Assignee set to Robin Mills
- Target version set to 0.26
Updated by Ben Touchette almost 5 years ago
- File cpp11-autoconf.diff cpp11-autoconf.diff added
- File cpp11-cmake.diff cpp11-cmake.diff added
To help i've separated the diffs into their basic component. Note that some the C++11 changes would most likely be needed for the xmp sdk split.
Updated by Ben Touchette almost 5 years ago
- File cpp11-uniqueptr.diff cpp11-uniqueptr.diff added
- File cpp11-mt.diff cpp11-mt.diff added
crap mouse clicked on the wrong button and missing the two next files.
Updated by Robin Mills over 4 years ago
- Target version changed from 0.26 to 0.28
Ben:
This is quite a large patch and SVN merge rejects part of the patch.
I'm pushing this to v0.27. I'm exhausted. I want to get the release/web-site published for Andreas to review. I'm willing to listen to any convincing reason to accept this for v0.26.
Updated by Robin Mills over 4 years ago
- Target version changed from 0.28 to 0.27
I believe Ben has done this work and it's included in the cpp11-xmpsdk-split branch.
Updated by Robin Mills about 3 years ago
- % Done changed from 0 to 10
- Estimated time set to 10.00 h
Ben: Thank You for your hard work on this. I'm now getting ready for Exiv2 v0.27 RC1 which I hope will be released in October. GM for Christmas.
I will investigate this patch/code and submit appropriately to 'master'.
Updated by Robin Mills about 3 years ago
- Status changed from Assigned to Closed
- % Done changed from 10 to 100
- Estimated time changed from 10.00 h to 2.00 h
I'm going to close this issue. We have now released exiv2 v0.27 RC1 on http://exiv2.dyndns.org
We are being pushed by digiKam to ensure that multi-threading is given a lot of attention in Exiv2 v0.28.
Ben: I would like to thank you for your contribution to Exiv2 v0.27 and that I have acknowledged you at the top of the release notes.