From 694d86e5c514bcc444b07800c895e30cf95c7f3a Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 21 Aug 2014 13:05:29 +0100 Subject: [PATCH] fix vipsthumbnail on very-many-core systems see: https://github.com/jcupitt/libvips/issues/160 we were using UNBUFFERED, but on very-many-core systems this can get out of order enough to make vipspng free the read object early --- ChangeLog | 1 + tools/vipsthumbnail.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05a971dc..f278b1df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ - fix similarity rotate+scale, thanks Topochicho - fix 16-bit PNG save, thanks John - fix dzsave date on Windows, thanks John +- fix vipsthumbnail on many-core systems, thanks James 25/7/14 started 7.40.5 - fix a race in im_maxpos_avg() diff --git a/tools/vipsthumbnail.c b/tools/vipsthumbnail.c index d4a66e3f..cb250fc2 100644 --- a/tools/vipsthumbnail.c +++ b/tools/vipsthumbnail.c @@ -318,8 +318,10 @@ thumbnail_open( VipsObject *process, const char *filename ) "loading jpeg with factor %d pre-shrink", jpegshrink ); + /* We can't use UNBUFERRED safely on very-many-core systems. + */ if( !(im = vips_image_new_from_file( filename, - "access", VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, + "access", VIPS_ACCESS_SEQUENTIAL, "shrink", jpegshrink, NULL )) ) return( NULL ); @@ -328,7 +330,7 @@ thumbnail_open( VipsObject *process, const char *filename ) /* All other formats. */ if( !(im = vips_image_new_from_file( filename, - "access", VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, + "access", VIPS_ACCESS_SEQUENTIAL, NULL )) ) return( NULL ); }