On 2012/06/05 14:09:32, Peng wrote:
> lgtm. But don't understand why origin code has problem. Please explain it.
> Thanks.
BTW, I already submit it. please close it.
Please see also
http://cplusplus.com/reference/stl/vector/push_back/
> This effectively increases the vector size by one, which causes a reallocation
of the internal allocated
> storage if the vector size was equal to the vector capacity before the call.
Reallocations invalidate all
> previously obtained iterators, references and pointers.
By this error, Database::query returns NULL pointer, and ibus-pinyin crashes on
g_assert on Query::fill.
On 2012/06/06 05:04:04, hsumita1 wrote:
> Please see also
>
> http://cplusplus.com/reference/stl/vector/push_back/
> > This effectively increases the vector size by one, which causes a
reallocation
> of the internal allocated
> > storage if the vector size was equal to the vector capacity before the call.
> Reallocations invalidate all
> > previously obtained iterators, references and pointers.
>
> By this error, Database::query returns NULL pointer, and ibus-pinyin crashes
on
> g_assert on Query::fill.
I see. Thank you.
Issue 6294043: Fixes a bug caused by a reallocation on vector.
(Closed)
Created 13 years ago by hsumita1
Modified 13 years ago
Reviewers: shawn.p.huang_gmail.com, Peng Huang, penghuang, Peng
Base URL: git://github.com/ibus/ibus-pinyin.git@master
Comments: 0