https://bugs.kde.org/show_bug.cgi?id=434926

--- Comment #3 from Bernie Innocenti <ber...@codewiz.org> ---
In case it helps, I was able to build liblmdb with debug symbols and find the
exact point where the crash occurs:

#0  0x00007ffff75db86a in mdb_node_search (mc=mc@entry=0x7ffff16c4240,
key=key@entry=0x7ffff16c4620, exactp=exactp@entry=0x7ffff16c415c) at mdb.c:5341
 5338                    while (low <= high) {
 5339                            i = (low + high) >> 1;
 5340
 5341   HERE ->           node = NODEPTR(mp, i);
 5342                            nodekey.mv_size = NODEKSZ(node);
 5343                            nodekey.mv_data = NODEKEY(node);
 5344
 5345                            rc = cmp(key, &nodekey);

(gdb) p i
$6 = 0
(gdb) p *mp
$7 = {
  mp_p = {
    p_pgno = 42014499,
    p_next = 0x2811723
  },
  mp_pad = 5922,
  mp_flags = 641,
  mp_pb = {
    pb = {
      pb_lower = 0,
      pb_upper = 0
    },
    pb_pages = 0
  },
  mp_ptrs = {5921}
}

This seems suspicious:

(gdb) p low
$8 = 1
(gdb) p high
$9 = 2147483639

How can we get i=0 from "i = (low + high) >> 1" at line 5339?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to