Ticket #415 (closed defect: fixed)

Opened 3 months ago

Last modified 2 months ago

get_document() on an empty database raises floating point exception

Reported by: richard Owned by: olly
Priority: normal Milestone: 1.0.18
Component: Library API Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Operating System: All Blocking:

Description

By empty, I mean a Database object uninitialised with any concrete databases.

Example code in python:

import xapian
db=xapian.Database()
db.get_document (1)

I would expect a DocNotFound? exception.

Change History

Changed 3 months ago by olly

  • component changed from Other to Library API
  • milestone set to 1.1.4

This is because we don't check internal.size() and then proceed to divide and modulus by 0.

In fact many methods of Xapian::Database currently fail to check this...

We should fix this before 1.1.4 - it's not showstopper bug, but it's easy to fix and low risk.

Changed 3 months ago by olly

  • status changed from new to assigned
  • milestone changed from 1.1.4 to 1.0.18

Fixed for all methods of Database in trunk r13668 (and noted ticket number in r13669).

Marking for backporting to 1.0.18.

Changed 2 months ago by olly

  • status changed from assigned to closed
  • resolution set to fixed

Backported in r13679.

Note: See TracTickets for help on using tickets.