[k3b] [Bug 386983] Refresh button in the Programs section causes segfault
Leslie Zhai
bugzilla_noreply at kde.org
Wed Dec 6 07:41:53 UTC 2017
https://bugs.kde.org/show_bug.cgi?id=386983
--- Comment #17 from Leslie Zhai <lesliezhai at llvm.org.cn> ---
(In reply to Ismail Donmez from comment #16)
> (In reply to Leslie Zhai from comment #15)
> > (In reply to Ismail Donmez from comment #14)
> > > Hi,
> > >
> > > I don't understand
> > > https://cgit.kde.org/k3b.git/commit/
> > > ?id=ce5d7b139d07a875ea89fe049be852baf23f99f7 at all.
> > >
> > > + d->gcBins << d->bins;
> > > d->bins.clear();
> > >
> > > and where do you use d->gcBins exactly?
> >
> > https://github.com/KDE/k3b/blob/master/libk3b/core/k3bexternalbinmanager.
> > cpp#L188
>
> That's deletion, you don't actually use it at all. This fix looks very very
> wrong.
So it is called gcBins for Garbage Collection.
But it is not able to free d->bins directly due to heap-use-after-free issue
https://bugsfiles.kde.org/attachment.cgi?id=109022
You could rollback the commit, then rebuild K3B with such option to reproduce
the issue:
cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_COMPILER=clang++ \
-DECM_ENABLE_SANITIZERS='address;undefined' \
-DCMAKE_CXX_FLAGS="-fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-bb,trace-cmp"
\
-DCMAKE_BUILD_TYPE=Debug \
-DKDE_INSTALL_LIBDIR=lib \
-DKDE_INSTALL_LIBEXECDIR=lib \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DK3B_BUILD_API_DOCS=ON \
-DK3B_ENABLE_PERMISSION_HELPER=ON \
-DK3B_DEBUG=ON
Regards,
Leslie Zhai - a LLVM developer https://reviews.llvm.org/p/xiangzhai/
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the k3b
mailing list