wine/dlls/gdiplus
Jinoh Kang 7abca9742a gdiplus: Avoid copying GpImage's busy flag in select_frame_wic().
The 'busy' field in GpImage is used as an atomic variable.  The C11
standard (§5.1.2.4, paragraph 25) states that two conflicting actions to
a memory location shall be both atomic operations, or otherwise properly
synchronized; otherwise, it constitutes a data race.

However, select_frame_wic() performs a non-atomic access to the 'busy'
field on a GpImage that is potentially accessible by other threads.
This happens when select_frame_wic() copies new_image to the old image
object.  Although it does attempt to preserve the value of the 'busy'
field by setting new_image->busy = image->busy first, thereby
effectively assigning an identical value to the field, it is unclear
that this does not actually constitute a theoretical, if not practical,
data race.  This also prevents replacing the busy flag with a mutex or
other synchronization primitives.

Therefore, skip the 'busy' field when copying fields from the new image
to the original image object.
2022-10-24 11:17:37 +02:00
..
tests gdiplus/tests: Enable compilation with long types. 2022-02-28 21:31:56 +01:00
brush.c gdiplus: Enable compilation with long types. 2022-02-14 21:20:41 +01:00
customlinecap.c
font.c gdiplus: Accept newer version in OpenType header. 2022-04-11 11:54:54 +02:00
gdiplus.c gdiplus: Enable compilation with long types. 2022-02-14 21:20:41 +01:00
gdiplus.manifest
gdiplus.rc
gdiplus.spec
gdiplus11.manifest
gdiplus_private.h
graphics.c gdiplus: Get the compositing mode directly from the graphics object. 2022-09-28 15:39:04 +02:00
graphicspath.c
image.c gdiplus: Avoid copying GpImage's busy flag in select_frame_wic(). 2022-10-24 11:17:37 +02:00
imageattributes.c gdiplus: Enable compilation with long types. 2022-02-14 21:20:41 +01:00
Makefile.in gdiplus: Enable compilation with long types. 2022-02-14 21:20:41 +01:00
matrix.c
metafile.c gdiplus: Enable compilation with long types. 2022-02-14 21:20:41 +01:00
pathiterator.c
pen.c gdiplus: Enable compilation with long types. 2022-02-14 21:20:41 +01:00
region.c gdiplus: Enable compilation with long types. 2022-02-14 21:20:41 +01:00
stringformat.c