Create AgePostingSource on heap
There was an undocumented behaviour change in Xapian 1.4 where Xapian::Query() no longer internally creates a clone of the PostingResource that we pass to it and instead takes a (shared) ownership of the pointer that is then re-used later while the actual query is being executed, which means that the PostingResource must live at least until the query execution is finished. We were creating the AgePostingSource on stack, which lead to use-after-free in Xapian 1.4. BUG: 363741 FIXED-IN: 5.3.2
Please register or sign in to comment