Package: libjudydebian1
Version: 1.0.5-1.1
Severity: grave
Tags: upstream
Justification: renders package unusable

Dear Maintainer,

gcc-4.8.3+ miscompile libjudy on AMD64. Workarounds:
* use -fno-aggressive-loop-optimizations
* compile witn gcc-4.7
* compile with clang :-)

Judy's quite obscure; I've not seen any obvious bug, but it's a challenge to
compilers... And -fno-aggressive-loop-optimizations works around the bug so
I hesitate to fill a PR on https://gcc.gnu.org/bugzilla/.

Oh yes, GCC upstream doesn't work either (tested w/pristine 4.8.3 and 4.9.1).

Here's a testcase:

---><---
// testj1.cc

#include <cstdint>
#include <stdexcept>
#include <Judy.h>

using namespace std;

namespace {

        uint64_t Items[] =
        {
            39895168241613, 72383693324832, 395899889036069, 847472082254022, 
946081064318053, 1037167590154045,
            1633874457044695, 1693551557777793, 1699866756097333, 
2297933432179674, 2340748542246111, 2490696201066604,
            2928757784612027, 3419613478295142, 3477583438964521, 
3487665594607298, 3714788097418699, 3721974488148864,
            3758589574777127, 4156020789217938, 4459711081140573, 
4682530741276476, 4731624807195863, 4846840683894723,
            4857387254864689, 4873346723597917, 4966839149608974, 
5631406002858271, 5722255428668219, 5820718729024077,
            6209639118315956, 6406299749329887, 6454295835737737, 
6503048444249319, 6520786252857121, 6906836761168795,
            6926132865086029, 6954533820994232
    };

}

int
main(int /*argc*/, char const * /*argv*/[])
{
        int    Rc_int;                // boolean values returned (0 or 1)
        Pvoid_t PJ1Array = nullptr; // initialize Judy1 array

        for (auto item: Items) {
                // set item
                J1S(Rc_int, PJ1Array, item);
                // get last (with value <= ii)
                auto ii = item;
                J1L(Rc_int, PJ1Array, ii);
                if (ii != item)
                        throw runtime_error("J1L: ii != item");
        }
        return 0;
}
---><---

This program inserts increasing int64_t's into a Judy1 array. After each insert,
it checks whether the last item is what was just added.

$ g++ -O3 -g -W -Wall -pipe -std=c++11 testj1.cc -o testj1 -lJudy

Expected result:

$ ./testj1
$

Actual result:

$ ./testj1 
terminate called after throwing an instance of 'std::runtime_error'
  what():  J1L: ii != item
Aborted (core dumped)
$

Thanks!

Yves


-- System Information:
Debian Release: jessie/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-3-generic (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages libjudydebian1 depends on:
ii  libc6  2.19-7

libjudydebian1 recommends no packages.

libjudydebian1 suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to