#83 closed defect (released)
segfault when adding a value to a document pointer
Reported by: | alec | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Xapian-bindings | Version: | 0.9.6 |
Severity: | minor | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | Linux |
Description
example code: <?
/* FROM phpinfo()
- xapian *
- Xapian Support => enabled
- Xapian Compiled Version => 0.9.6 */
set up a search db $index_path = "xapian_db"; $index_ptr = new_WritableDatabase($index_path, DB_CREATE_OR_OPEN);
$document_ptr = new_document();
this will make xapian segfault document_add_value($document_pointer, 0, 1);
?>
Attachments (2)
Change History (9)
by , 18 years ago
Attachment: | bug_segfault_when_adding_value.php added |
---|
comment:1 by , 18 years ago
I realise why this happened now. I am just not using the same name for the document_pointer when trying to add the value.
Segfault nevertheless! :)
comment:2 by , 18 years ago
writabledatabase_add_document() will also throw the segfault if its fed an incorrect resource as an index pointer.
likely this affects other xapian functions as well.
comment:3 by , 18 years ago
Severity: | major → minor |
---|---|
Status: | new → assigned |
This is a SWIG issue - the code it generates allows you to pass "Null" as the "this" pointer, converts it to NULL, and then calls methods on that. I'll fix it in SWIG - shouldn't be too hard.
by , 18 years ago
Attachment: | omega-htmlparser-ignore-javascript-lessthan.patch added |
---|
Patch to fix this bug
comment:5 by , 18 years ago
attachments.isobsolete: | 0 → 1 |
---|
(From update of attachment 21) Wrong bug! I hate bugzilla sometimes...
comment:6 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in SWIG CVS, which we'll be using for the next Xapian release.
comment:7 by , 18 years ago
Operating System: | → Linux |
---|---|
Resolution: | fixed → released |
bug demonstration