Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
56f0d01
meson: fix pkg-config generation with internal dependencies
kleisauke Mar 29, 2026
763fc6d
CI: disable TSan workflow
kleisauke Mar 29, 2026
e7cd7b7
CIFuzz: integrate ThreadSanitizer
kleisauke Oct 28, 2025
f746a3c
CIFuzz: built GLib with TSan instrumentation
kleisauke Mar 29, 2026
3aed0e9
fuzz: ensure TSan exits after first reported error
kleisauke Mar 28, 2026
15f3224
fuzz: ensure TSan suppressions are applied
kleisauke Mar 28, 2026
8ed96ff
fuzz: disable TSan errors from non-instrumented code
kleisauke Mar 28, 2026
d59908d
Prefer use of `g_once_init*`
kleisauke Mar 30, 2026
1e3d57b
threadpool: make `pool->stop` and `pool->error` atomic
kleisauke Mar 30, 2026
af66c63
Simplify previous commit
kleisauke Mar 30, 2026
5fd1b69
threadpool: avoid double check
kleisauke Mar 30, 2026
284d5cd
image: make `->kill` atomic
kleisauke Mar 30, 2026
bbd9207
image: avoid attaching/updating the time struct to `->progress_signal`
kleisauke Mar 30, 2026
5e822b4
region: skip `FALSE` assignment if region is already valid
kleisauke Mar 30, 2026
6a9fdb9
region: hoist `VIPS_IMAGE_SIZEOF_PEL` calculation to avoid race
kleisauke Mar 30, 2026
e13d378
sink: fix `->processed` data race on 64-bit platforms
kleisauke Mar 30, 2026
dac8deb
sinkdisc: skip error check if operation already failed
kleisauke Mar 30, 2026
610f507
sinkdisc: make `->kill` atomic
kleisauke Mar 30, 2026
6967b16
cgifsave: avoid triggering eval callbacks
kleisauke Mar 30, 2026
22f1e2b
threadpool: remove need of `worker->stop`
kleisauke Mar 31, 2026
6fa9d66
webpsave: trigger eval callbacks on `save->ready`
kleisauke Apr 1, 2026
64ff522
Merge branch 'master' into cifuzz-add-tsan
kleisauke Apr 1, 2026
3a992e7
dzsave: check cancellation on `save->ready`
kleisauke Apr 1, 2026
8154442
threadpool: guard progress reporting with `allocate_lock` mutex
kleisauke Apr 1, 2026
14e2839
Revert "sink: fix `->processed` data race on 64-bit platforms"
kleisauke Apr 1, 2026
be55e48
Revert "cgifsave: avoid triggering eval callbacks"
kleisauke Apr 1, 2026
44cd859
Simplify 8154442
kleisauke Apr 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify previous commit
  • Loading branch information
kleisauke committed Mar 31, 2026
commit af66c63df45a2bdfd2ef341dc0a94393ae369313
2 changes: 1 addition & 1 deletion libvips/arithmetic/avg.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ vips_avg_stop(VipsStatistic *statistic, void *seq)
*/
static int
vips_avg_scan(VipsStatistic *statistic, void *seq,
int x, int y, void *in, int n)
int x, int y, void *in, int n, gboolean *stop)
{
const int sz = n * vips_image_get_bands(statistic->ready);

Expand Down
2 changes: 1 addition & 1 deletion libvips/arithmetic/deviate.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ vips_deviate_stop(VipsStatistic *statistic, void *seq)

static int
vips_deviate_scan(VipsStatistic *statistic, void *seq,
int x, int y, void *in, int n)
int x, int y, void *in, int n, gboolean *stop)
{
const int sz = n * vips_image_get_bands(statistic->ready);

Expand Down
2 changes: 1 addition & 1 deletion libvips/arithmetic/hist_find.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ vips_hist_find_stop(VipsStatistic *statistic, void *seq)

static int
vips_hist_find_scan(VipsStatistic *statistic, void *seq,
int x, int y, void *in, int n)
int x, int y, void *in, int n, gboolean *stop)
{
VipsHistFind *hist_find = (VipsHistFind *) statistic;
Histogram *hist = (Histogram *) seq;
Expand Down
2 changes: 1 addition & 1 deletion libvips/arithmetic/hist_find_indexed.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ typedef void (*VipsHistFindIndexedScanFn)(VipsHistFindIndexed *indexed,

static int
vips_hist_find_indexed_scan(VipsStatistic *statistic, void *seq,
int x, int y, void *in, int n)
int x, int y, void *in, int n, gboolean *stop)
{
Histogram *hist = (Histogram *) seq;
VipsHistFindIndexed *indexed = (VipsHistFindIndexed *) statistic;
Expand Down
2 changes: 1 addition & 1 deletion libvips/arithmetic/hist_find_ndim.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ vips_hist_find_ndim_stop(VipsStatistic *statistic, void *seq)

static int
vips_hist_find_ndim_scan(VipsStatistic *statistic, void *seq,
int x, int y, void *in, int n)
int x, int y, void *in, int n, gboolean *stop)
{
Histogram *hist = (Histogram *) seq;
VipsHistFindNDim *ndim = (VipsHistFindNDim *) statistic;
Expand Down
2 changes: 1 addition & 1 deletion libvips/arithmetic/hough.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ vips_hough_stop(VipsStatistic *statistic, void *seq)

static int
vips_hough_scan(VipsStatistic *statistic,
void *seq, int x, int y, void *in, int n)
void *seq, int x, int y, void *in, int n, gboolean *stop)
{
VipsHough *hough = (VipsHough *) statistic;
VipsHoughClass *class = VIPS_HOUGH_GET_CLASS(hough);
Expand Down
4 changes: 2 additions & 2 deletions libvips/arithmetic/max.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ vips_max_stop(VipsStatistic *statistic, void *seq)
m = values->value[0]; \
\
if (m >= UPPER) { \
g_atomic_int_set(&statistic->stop, TRUE); \
g_atomic_int_set(stop, TRUE); \
break; \
} \
} \
Expand Down Expand Up @@ -381,7 +381,7 @@ vips_max_stop(VipsStatistic *statistic, void *seq)
*/
static int
vips_max_scan(VipsStatistic *statistic, void *seq,
int x, int y, void *in, int n)
int x, int y, void *in, int n, gboolean *stop)
{
VipsValues *values = (VipsValues *) seq;
const int bands = vips_image_get_bands(statistic->ready);
Expand Down
4 changes: 2 additions & 2 deletions libvips/arithmetic/min.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ vips_min_stop(VipsStatistic *statistic, void *seq)
m = values->value[0]; \
\
if (m <= LOWER) { \
g_atomic_int_set(&statistic->stop, TRUE); \
g_atomic_int_set(stop, TRUE); \
break; \
} \
} \
Expand Down Expand Up @@ -381,7 +381,7 @@ vips_min_stop(VipsStatistic *statistic, void *seq)
*/
static int
vips_min_scan(VipsStatistic *statistic, void *seq,
int x, int y, void *in, int n)
int x, int y, void *in, int n, gboolean *stop)
{
VipsValues *values = (VipsValues *) seq;
const int bands = vips_image_get_bands(statistic->ready);
Expand Down
2 changes: 1 addition & 1 deletion libvips/arithmetic/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ vips_profile_start(VipsStatistic *statistic)
*/
static int
vips_profile_scan(VipsStatistic *statistic, void *seq,
int x, int y, void *in, int n)
int x, int y, void *in, int n, gboolean *stop)
{
int nb = statistic->ready->Bands;
Edges *edges = (Edges *) seq;
Expand Down
2 changes: 1 addition & 1 deletion libvips/arithmetic/project.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ vips_project_start(VipsStatistic *statistic)
*/
static int
vips_project_scan(VipsStatistic *statistic, void *seq,
int x, int y, void *in, int n)
int x, int y, void *in, int n, gboolean *stop)
{
int nb = statistic->ready->Bands;
Histogram *hist = (Histogram *) seq;
Expand Down
7 changes: 1 addition & 6 deletions libvips/arithmetic/statistic.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,11 @@ vips_statistic_scan(VipsRegion *region,
p = VIPS_REGION_ADDR(region, r->left, r->top);
for (y = 0; y < r->height; y++) {
if (class->scan(statistic,
seq, r->left, r->top + y, p, r->width))
seq, r->left, r->top + y, p, r->width, stop))
return -1;
p += lsk;
}

/* If we've requested stop, pass the message on.
*/
if (g_atomic_int_get(&statistic->stop))
g_atomic_int_set(stop, TRUE);

return 0;
}

Expand Down
6 changes: 1 addition & 5 deletions libvips/arithmetic/statistic.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ typedef struct _VipsStatisticClass VipsStatisticClass;

typedef void *(*VipsStatisticStartFn)(VipsStatistic *statistic);
typedef int (*VipsStatisticScanFn)(VipsStatistic *statistic,
void *seq, int x, int y, void *p, int n);
void *seq, int x, int y, void *p, int n, gboolean *stop);
typedef int (*VipsStatisticStopFn)(VipsStatistic *statistic, void *seq);

struct _VipsStatistic {
Expand All @@ -69,10 +69,6 @@ struct _VipsStatistic {
*/
VipsImage *ready;

/* Set this to stop computation early.
*/
gboolean stop; // (atomic)

/* Client data for the subclass.
*/
void *a;
Expand Down
2 changes: 1 addition & 1 deletion libvips/arithmetic/stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ vips_stats_start(VipsStatistic *statistic)
*/
static int
vips_stats_scan(VipsStatistic *statistic, void *seq,
int x, int y, void *in, int n)
int x, int y, void *in, int n, gboolean *stop)
{
const int bands = vips_image_get_bands(statistic->ready);
VipsStats *local = (VipsStats *) seq;
Expand Down