-
-
Notifications
You must be signed in to change notification settings - Fork 727
Closed
Labels
Description
Program cashes when vips_rank called successively on same image.
Program exit with error:
[2] 60540 bus error ./a.out
To Reproduce
Sample image: https://raw.githubusercontent.com/elixir-image/image/main/test/support/images/tulips.png
#include <vips/vips.h>
int
main (int argc, char **argv)
{
if (VIPS_INIT (argv[0]))
return (-1);
VipsImage *img;
size_t size;
img = vips_image_new_from_file ("tulips.png", NULL);
for (uint i = 0; i < 500; i++) {
if (vips_rank (img, &img, 3, 3, 7, NULL) != 0) {
vips_error_exit (NULL);
}
}
(void)vips_image_write_to_memory (img, &size);
return (0);
}gcc -g -Wall seg_fault.c `pkg-config vips --cflags --libs`- run
./a.out
Unfortunately, I couldn't manage to get core-dump as I updated my machine recently, and I have to configure it to produce one.
Environment
* OS: MacOS 14.2.1
* Vips: vips-8.15.0