[Digikam-devel] [Bug 303119] digiKam crashes when applying Restoration on a PNG picture
Marcel Wiesweg
marcel.wiesweg at gmx.de
Thu Aug 23 19:09:00 BST 2012
https://bugs.kde.org/show_bug.cgi?id=303119
--- Comment #7 from Marcel Wiesweg <marcel.wiesweg at gmx.de> ---
==3687== Invalid write of size 1 ==3687== at 0x7BC8389:
cimg_library::CImg<float>::greycstoration_thread(void*) (greycstoration.h:457)
Look at the relevant code:
if (p.stop_request) delete p.stop_request;
[...]
(*p.stop_request) = false;
Already good for a crash, isn't it?
==3687== Invalid read of size 8 ==3687== at 0x7BC6F64:
cimg_library::CImg<float>::greycstoration_progress() const
(greycstoration.h:136) ==3687== by 0x7BC3FCE:
Digikam::GreycstorationFilter::iterationLoop(unsigned int)
(greycstorationfilter.cpp:482)
if (!greycstoration_is_running()) return 0.0f;
const unsigned long counter =
greycstoration_params->counter?*(greycstoration_params->counter):0;
Now the question is: is this thread-safe? Then we'd need to know about the
place and time of destroying the counter. It's here:
if (p.counter) delete p.counter;
In a thread, without mutex lock! This whole threading here I dont really like,
it's not clean.
I will have a look for a fix.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Digikam-devel
mailing list