Source: nickle
Version: 2.77-1
Severity: serious
Tags: patch

Hi,

nickle failed to build on mips after being rebuilt with PIE support with
the error:

> make  check-TESTS
> make[3]: Entering directory '/«PKGBUILDDIR»/test'
> PASS: scanf.5c
> PASS: gcdtest.5c
> PASS: inttest.5c
> PASS: optest.5c
> PASS: orderofoptest.5c
> PASS: rattest.5c
> PASS: reftest.5c
> PASS: modtest.5c
> PASS: hashtest.5c
> PASS: signal.5c
> PASS: round.5c
> nickle: value.h:980: BoxElements: Assertion `!(box)->replace' failed.
> FAIL: math.5c
> PASS: factorial.5c
> PASS: is_type.5c
> ==================================
> 1 of 14 tests failed
> Please report to http://nickle.org
> ==================================

The assertion fails inside BoxValueSet which is called from NewTypedBox.
It seems that box->replace is never initialized in that function.
Applying the attacked patch to initialize it to false fixes the bug for me.

Thanks,
James
diff -Nru nickle-2.77/box.c nickle-2.77/box.c
--- nickle-2.77/box.c	2011-09-29 08:15:13.000000000 +0000
+++ nickle-2.77/box.c	2017-03-15 14:53:39.000000000 +0000
@@ -57,6 +57,7 @@
     box->constant = False;
 /*    box->array = array; */
     box->homogeneous = False;
+    box->replace = False;
     box->u.types = bt;
     box->nvalues = bt->count;
     for (i = 0; i < bt->count; i++)

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to