Re: Fwd: Magick++ Bug Report

Bob Friesenhahn <[email protected]> Wed, 18 Feb 2015 09:08:06 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.core
Message-ID <[email protected]>
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-2024194861-1424272086=:3653
Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by blade.simplesystems.org
	id t1IF86fO001434

On Tue, 17 Feb 2015, Hyrum Wright wrote:

> See below for a bug in ImageMagick that Dirk thinks may also be in Grap=
hicsMagick.

Fixes for this problem are now in GraphicsMagick Mercurial and will be=20
in the next release.

Thanks for reporting it.

Bob

>=20
> ---------- Forwarded message ----------
> From: Dirk Lemstra <[email protected]>
> Date: Tue, Feb 17, 2015 at 6:28 PM
> Subject: Re: Magick++ Bug Report
> To: Hyrum Wright <[email protected]>
>=20
>=20
> Hyrum,
>=20
> You might also want to contact the maintainer of GraphicsMagick. Their =
code has the same issue.
>=20
> Dirk
>=20
> On 18-02-2015 00:07, Lexie Parsimoniae wrote:
>
>       From: Hyrum Wright <[email protected]>
>       Reply-To: Hyrum Wright <[email protected]>
>       X-Mailer: PHP/5.3.3
>       Origin: 72.14.228.1
>
>       On the 6.9.0 branch, Magick++/lib/Blob.cpp and Magick++/lib/Image=
.cpp don't do proper locking.=C2=A0
>       Specifically, the line of the form:
>
>       =C2=A0 Lock(&_imgRef->_mutexLock);
>
>       or
>
>       =C2=A0 Lock(&_blobRef->_mutexLock);
>
>       are wrong.=C2=A0 These lines look like they are attempting to use=
 RAII to ensure the mutex is unlocked when the
>       relevant functions return, but instead these lines create a *temp=
orary* unnamed lock that is immediately
>       released.=C2=A0 The proper fix looks something like:
>
>       =C2=A0 Lock lock(&_imgRef->_mutexLock);
>
>       I count 6 instances of this bug in Blob.cpp and 8 in Image.cpp.=C2=
=A0 These were found using the
>       misc-unused-raii check from clang-tidy.
>
>       It doesn't look like this problem exists on trunk, since the lock=
ing has been moved to BlobRef.cpp and
>       ImageRef.cpp and made manual.
>
>       -Hyrum
>=20
>=20
>=20
>

--=20
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen=
/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
---559023410-2024194861-1424272086=:3653
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
---559023410-2024194861-1424272086=:3653
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Graphicsmagick-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-core

---559023410-2024194861-1424272086=:3653--