Bug#812093: libimager-perl: FTBFS: Failed 1/65 test programs. 0/4481 subtests failed.

2016-01-21 Thread Niko Tyni
Control: reassign -1 libgif7 5.1.2-0.1
Control: forwarded -1 http://sourceforge.net/p/giflib/bugs/81/
Control: retitle -1 libgif7: DGifOpen() broken because it uses unallocated 
memory
Control: tag -1 upstream patch

On Thu, Jan 21, 2016 at 06:37:30PM +1100, Tony Cook wrote:
> On Wed, Jan 20, 2016 at 10:38:27PM +0200, Niko Tyni wrote:
> > On Wed, Jan 20, 2016 at 02:42:04PM +0100, Chris Lamb wrote:
> > > Source: libimager-perl
> > > Version: 1.004+dfsg-1
> > > Severity: serious
> > > Justification: fails to build from source
> > > User: reproducible-bui...@lists.alioth.debian.org
> > > Usertags: ftbfs
> > > X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org
> > 
> > > libimager-perl fails to build from source in unstable/amd64:
> > 
> > It broke with src:giflib 5.1.2-0.1 -> 5.1.1-0.2. Don't know
> > why yet.
> > 
> > % perl -MImager -e 'Imager->new->read(type => "gif", file => 
> > "GIF/testimg/expected.gif") or die'
> > 
> > dies with the new giflib but not the old one.
> > 
> > Cc'ing Matthias Klose as a heads-up, he uploaded 5.1.1-0.2.
> 
> The read failures are caused by a bug present in both 5.1.1 and 5.1.2,
> partly fixed in giflib git at commit
> ef0cb9b4be572262b49fbc26fb2348683f44a517.
> 
> A similar fix is required to DGifOpen() for Imager's GIF support to
> work (reliably), reported upstream as
> https://sourceforge.net/p/giflib/bugs/81/

Thanks! I can confirm that libimager-perl builds and works again
for me with the attached patch to giflib. Reassigning.
-- 
Niko Tyni   nt...@debian.org
>From 60d124d3e829635b5b868f5dd6de6b7421ce03b5 Mon Sep 17 00:00:00 2001
From: Niko Tyni 
Date: Thu, 21 Jan 2016 18:56:49 +0200
Subject: [PATCH] Initialize memory in DGifOpen() too

Commit ef0cb9b4be572262b49fbc26fb2348683f44a517 fixed this for
DGifOpenFileHandle(), but missed the other code path.

Bug: http://sourceforge.net/p/giflib/bugs/81/
Bug-Debian: https://bugs.debian.org/812093
---
 lib/dgif_lib.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/dgif_lib.c b/lib/dgif_lib.c
index 667e939..2f8ac8b 100644
--- a/lib/dgif_lib.c
+++ b/lib/dgif_lib.c
@@ -166,6 +166,7 @@ DGifOpen(void *userData, InputFunc readFunc, int *Error)
 	*Error = D_GIF_ERR_NOT_ENOUGH_MEM;
 return NULL;
 }
+/*@i1@*/memset(GifFile, '\0', sizeof(GifFileType));
 
 memset(GifFile, '\0', sizeof(GifFileType));
 
@@ -180,6 +181,7 @@ DGifOpen(void *userData, InputFunc readFunc, int *Error)
 free((char *)GifFile);
 return NULL;
 }
+/*@i1@*/memset(Private, '\0', sizeof(GifFilePrivateType));
 
 GifFile->Private = (void *)Private;
 Private->FileHandle = 0;
-- 
2.7.0.rc3



Bug#812093: libimager-perl: FTBFS: Failed 1/65 test programs. 0/4481 subtests failed.

2016-01-21 Thread Tony Cook
On Thu, Jan 21, 2016 at 07:11:01PM +0200, Niko Tyni wrote:
> Control: retitle -1 libgif7: DGifOpen() broken because it uses unallocated 
> memory

uninitialized memory, not unallocated.

Tony



Bug#812093: libimager-perl: FTBFS: Failed 1/65 test programs. 0/4481 subtests failed.

2016-01-20 Thread Tony Cook
On Wed, Jan 20, 2016 at 10:38:27PM +0200, Niko Tyni wrote:
> On Wed, Jan 20, 2016 at 02:42:04PM +0100, Chris Lamb wrote:
> > Source: libimager-perl
> > Version: 1.004+dfsg-1
> > Severity: serious
> > Justification: fails to build from source
> > User: reproducible-bui...@lists.alioth.debian.org
> > Usertags: ftbfs
> > X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org
> 
> > libimager-perl fails to build from source in unstable/amd64:
> 
> It broke with src:giflib 5.1.2-0.1 -> 5.1.1-0.2. Don't know
> why yet.
> 
> % perl -MImager -e 'Imager->new->read(type => "gif", file => 
> "GIF/testimg/expected.gif") or die'
> 
> dies with the new giflib but not the old one.
> 
> Cc'ing Matthias Klose as a heads-up, he uploaded 5.1.1-0.2.

The read failures are caused by a bug present in both 5.1.1 and 5.1.2,
partly fixed in giflib git at commit
ef0cb9b4be572262b49fbc26fb2348683f44a517.

A similar fix is required to DGifOpen() for Imager's GIF support to
work (reliably), reported upstream as
https://sourceforge.net/p/giflib/bugs/81/

Without the fix the Private member RunningBits isn't initialized,
leaving RunningBits as whatever happened to be in memory at that
point, so the check in DGifSetupDecompress() has a large chance of
failing with a D_GIF_ERR_READ_FAILED error.

Adding the initialization allows Imager to pass its tests.

That said, there is a bug in that test script, since its custom ok()
doesn't have a prototype, the tests on line 65 and 78 pass when they
should fail, leading to the crash on line 79 when it tries to compare
uninitialized images.

Adding a prototype fixes it, though I'll probably end up tossing the
custom code and using Test::More.

Tony



Bug#812093: libimager-perl: FTBFS: Failed 1/65 test programs. 0/4481 subtests failed.

2016-01-20 Thread Niko Tyni
On Wed, Jan 20, 2016 at 02:42:04PM +0100, Chris Lamb wrote:
> Source: libimager-perl
> Version: 1.004+dfsg-1
> Severity: serious
> Justification: fails to build from source
> User: reproducible-bui...@lists.alioth.debian.org
> Usertags: ftbfs
> X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

> libimager-perl fails to build from source in unstable/amd64:

It broke with src:giflib 5.1.2-0.1 -> 5.1.1-0.2. Don't know
why yet.

% perl -MImager -e 'Imager->new->read(type => "gif", file => 
"GIF/testimg/expected.gif") or die'

dies with the new giflib but not the old one.

Cc'ing Matthias Klose as a heads-up, he uploaded 5.1.1-0.2.
-- 
Niko Tyni   nt...@debian.org



Bug#812093: libimager-perl: FTBFS: Failed 1/65 test programs. 0/4481 subtests failed.

2016-01-20 Thread Chris Lamb
Source: libimager-perl
Version: 1.004+dfsg-1
Severity: serious
Justification: fails to build from source
User: reproducible-bui...@lists.alioth.debian.org
Usertags: ftbfs
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Dear Maintainer,

libimager-perl fails to build from source in unstable/amd64:

  [..]

  ok 30 - check mono is mono
  ok 31 - got basic test image (by name)
  ok 32 - check basic image type
  ok 33 - check basic image channels
  ok 34 - check basic image bits
  ok 35 - check basic isn't mono
  ok 36 - got 16-bit basic test image (by name)
  ok 37 - check 16-bit basic image type
  ok 38 - check 16-bit basic image channels
  ok 39 - check 16-bit basic image bits
  ok 40 - check 16-bit basic isn't mono
  ok 41 - got double basic test image (by name)
  ok 42 - check double basic image type
  ok 43 - check double basic image channels
  ok 44 - check double basic image bits
  ok 45 - check double basic isn't mono
  ok 46 - got gray test image (by name)
  ok 47 - check gray image type
  ok 48 - check gray image channels
  ok 49 - check gray image bits
  ok 50 - check gray isn't mono
  ok 51 - got gray test image (by name)
  ok 52 - check 16-bit gray image type
  ok 53 - check 16-bit gray image channels
  ok 54 - check 16-bit gray image bits
  ok 55 - check 16-bit isn't mono
  ok 56 - got mono image (by name)
  ok 57 - check mono image type
  ok 58 - check mono image channels
  ok 59 - check mono image bits
  ok 60 - check mono is mono
  ok
  t/900-util/020-error.t .. 
  1..7
  ok 1 - use Imager;
  ok 2 - read of junk.ppm should have failed
  ok 3 - got the errors
  ok 4 - entry 0 is an array ref
  ok 5 - entry 0 has 2 elements
  ok 6 - check message
  ok 7 - error code should be 0
  ok
  t/900-util/030-log.t  
  1..6
  ok 1 - open log
  ok 2 - file is there
  ok 3 - check message made it to the log
  ok 4 # skip Logging built
  ok 5 # skip Logging built
  ok 6 # skip Logging built
  ok
  t/900-util/040-limit.t .. 
  1..31
  ok 1 - set limits to 10, 10, 300
  ok 2 - successful check limits in parent
  ok 3 - failed check limits in parent
  ok 4 - 1: set limits to 5 x 5, 75 bytes
  ok 5 - 1: successful check 5 x 5
  ok 6 - 1: failed check 5 x 5, ssize 2
  ok 7 - check limits are still 5 x 5 , 75 bytes
  ok 8 - 2: set limits to 10 x 10, 300 bytes
  ok 9 - 2: successful check 10 x 10
  ok 10 - 2: failed check 10 x 10, ssize 2
  ok 11 - check limits are still 10 x 10 , 300 bytes
  ok 12 - 3: set limits to 15 x 15, 675 bytes
  ok 13 - 3: successful check 15 x 15
  ok 14 - 3: failed check 15 x 15, ssize 2
  ok 15 - check limits are still 15 x 15 , 675 bytes
  ok 16 - 4: set limits to 20 x 20, 1200 bytes
  ok 17 - 4: successful check 20 x 20
  ok 18 - 4: failed check 20 x 20, ssize 2
  ok 19 - check limits are still 20 x 20 , 1200 bytes
  ok 20 - 5: set limits to 25 x 25, 1875 bytes
  ok 21 - 5: successful check 25 x 25
  ok 22 - 5: failed check 25 x 25, ssize 2
  ok 23 - check limits are still 25 x 25 , 1875 bytes
  ok 24 - join child 1
  ok 25 - join child 2
  ok 26 - join child 3
  ok 27 - join child 4
  ok 28 - join child 5
  ok 29 - test we still pass
  ok 30 - test we still fail
  ok 31 - check original main thread limits still set
  ok
  t/900-util/050-matrix.t . 
  1..25
  ok 1 - use Imager::Matrix2d;
  ok 2 - identity matrix
  ok 3 - translate matrix
  ok 4 - translate just x
  ok 5 - translate just y
  ok 6 - rotate matrix
  ok 7 - shear matrix
  ok 8 - scale matrix
  ok 9 - custom matrix
  ok 10 - translate called on rotate with just x
  ok 11 - translate called on rotate with just y
  ok 12 - bad custom matrix
  ok 13 - check error
  ok 14 - mult by unblessed matrix
  ok 15 - mult with unblessed matrix
  ok 16 - mult by three
  ok 17 - mult with three
  ok 18 - mult by hash ref died
  ok 19 - check message
  ok 20 - mult by short array ref died
  ok 21 - check message
  ok 22 - mult by bad scalar died
  ok 23 - check message
  ok 24 - x from rotate (0,0) around (10, 5)
  ok 25 - y from rotate (0,0) around (10, 5)
  ok
  t/900-util/060-extutil.t  
  1..6
  ok 1 - check dirs absolute
  ok 2 - has the -I
  ok 3 - found a header
  ok 4 - got a typemap path
  ok 5 - it exists
  ok 6 - it seems to be the right file
  ok
  t/900-util/060-hlines.t . 
  1..17
  ok 1 - made hline
  ok 2 - check values
  ok 3 - check (-5, 7) added
  ok 4 - check (8, 4) added
  ok 5 - check (3, 3) added
  ok 6 - check (2, 6) added
  ok 7 - check (6, -5, 5) not added
  ok 8 - check (6, 100, 5) not added
  ok 9 - check (-1, 5, 2) not added
  ok 10 - check (10, 5, 2) not added
  ok 11 - check internal overlap merged
  ok 12 - lots of segments
  ok 13 - merge lots of segments
  ok 14 - left merge
  ok 15 - right merge
  ok 16 - make hlines object from image
  ok 17 - check initialized properly
  ok
  t/950-kwalitee/010-pod.t  skipped: POD only tested under automated or 
author testing
  t/950-kwalitee/020-samples.t  
  1..32
  ok 1 - sample file