Closed
Description
Certain images from the openjpeg test data repo cause vips to crash
Steps to reproduce the behavior:
- Download e.g. Bretagne2_4.j2k
- vips copy Bretagne2_4.j2k foo.jpg
- Crash
This happens with the windows builds from 8.15.3 down until 8.12.0. 8.11.4 does not crash. Unfortunately these builds do not contain debug info. But with our custom builds we get the following stack traces on Linux and Windows:
(gdb) bt
#0 0x00007ffff69c0684 in vips_foreign_load_jp2k_pack () from ../lib/libvips.so.42
#1 0x00007ffff69c2ec5 in vips_foreign_load_jp2k_generate_untiled () from ../lib/libvips.so.42
#2 0x00007ffff6b7198e in vips_region_prepare_to_generate () from ../lib/libvips.so.42
#3 0x00007ffff6b7ece0 in vips_region_prepare_to () from ../lib/libvips.so.42
#4 0x00007ffff6acf552 in vips_tile_cache_gen () from ../lib/libvips.so.42
#5 0x00007ffff6b7044f in vips_region_generate () from ../lib/libvips.so.42
#6 0x00007ffff6b71085 in vips_region_fill () from ../lib/libvips.so.42
#7 0x00007ffff6b7eae9 in vips_region_prepare () from ../lib/libvips.so.42
#8 0x00007ffff6b61909 in vips_image_write_gen () from ../lib/libvips.so.42
#9 0x00007ffff6b7044f in vips_region_generate () from ../lib/libvips.so.42
#10 0x00007ffff6b71085 in vips_region_fill () from ../lib/libvips.so.42
#11 0x00007ffff6b7eae9 in vips_region_prepare () from ../lib/libvips.so.42
#12 0x00007ffff69bd439 in vips_foreign_load_generate () from ../lib/libvips.so.42
#13 0x00007ffff6b7044f in vips_region_generate () from ../lib/libvips.so.42
#14 0x00007ffff6b71085 in vips_region_fill () from ../lib/libvips.so.42
#15 0x00007ffff6b7eae9 in vips_region_prepare () from ../lib/libvips.so.42
#16 0x00007ffff6adfcb9 in vips_copy_gen () from ../lib/libvips.so.42
#17 0x00007ffff6b7044f in vips_region_generate () from ../lib/libvips.so.42
#18 0x00007ffff6b71085 in vips_region_fill () from ../lib/libvips.so.42
#19 0x00007ffff6b7eae9 in vips_region_prepare () from ../lib/libvips.so.42
#20 0x00007ffff6b61909 in vips_image_write_gen () from ../lib/libvips.so.42
#21 0x00007ffff6b7044f in vips_region_generate () from ../lib/libvips.so.42
#22 0x00007ffff6b71085 in vips_region_fill () from ../lib/libvips.so.42
#23 0x00007ffff6b7eae9 in vips_region_prepare () from ../lib/libvips.so.42
#24 0x00007ffff6adfcb9 in vips_copy_gen () from ../lib/libvips.so.42
#25 0x00007ffff6b7198e in vips_region_prepare_to_generate () from ../lib/libvips.so.42
#26 0x00007ffff6b7ece0 in vips_region_prepare_to () from ../lib/libvips.so.42
#27 0x00007ffff6b69428 in wbuffer_work_fn () from ../lib/libvips.so.42
#28 0x00007ffff6b53229 in vips_thread_main_loop () from ../lib/libvips.so.42
#29 0x00007ffff6b5293a in vips_threadset_work () from ../lib/libvips.so.42
#30 0x00007ffff6b5245f in vips_thread_run () from ../lib/libvips.so.42
#31 0x00007ffff67e56ad in g_thread_proxy () from ../lib/libglib-2.0.so.0
#32 0x00007ffff651aac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#33 0x00007ffff65ac850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Let me know if I can help resolving this issue.