[Aptitude-devel] "examine view" crashing in curse aptitude

Alban Browaeys prahal at yahoo.com
Tue Jul 28 12:28:34 UTC 2009

To reproduce I do an "U" then "e" in aptitude --no-gui -t experimental

update_dep_display seems broken to me . It calls d.get_dep() on a d that
could be set to have cache int 0 and start int 4 (because of the
unhighlights that cause this d to be an invalid d as told in the empty
args constructor for aptitude_resolver_dep )
and as d.get_dep() calls cache->... and dereference start this leads to
segfault (when attempting to render the solver in aptitude curse visible

I am new to c++, so it takes me time to understand the internals of
aptitude . I don't expect to find a proper fix anytime soon so please
beat me at that :)

In short I don't know if update_dep_display is wrong or if that s all
the  set_active_dep(aptitude_resolver_dep()); which are wrong (in that
aptitude_resolver_dep in my understanding create a d with a 0 assigned
cache value which when dereferenced by d.get_dep() cache->getCache()
cann only lead to segfault)...

Best regards


Program received signal SIGSEGV, Segmentation fault.
aptitude_resolver_dep::get_dep (d=..., tBare=0xb19f2f28) at
481        return pkgCache::DepIterator(cache->GetCache(),
const_cast<pkgCache::Dependency *>(start));
(gdb) p cache
Cannot access memory at address 0x0
(gdb) p start
Cannot access memory at address 0x4

(gdb) bt
#0  aptitude_resolver_dep::get_dep (d=..., tBare=0xb2a5f448) at
#1  update_dep_display (d=..., tBare=0xb2a5f448) at solution_screen.cc:586
#2  0x08102cea in sigc::internal::slot_call1<sigc::bind_functor<-1,
sigc::pointer_functor2<aptitude_resolver_dep, cwidget::widgets::tree*,
void>, menu_tree*, sigc::nil, sigc::nil, sigc::nil, sigc::nil,
sigc::nil, sigc::nil>, void,
aptitude_resolver_dep const&) ()
#3  0x080fa441 in sigc::slot1<void, aptitude_resolver_dep>::operator()
(this=0xb1a42838, highlighted=false)
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:515
#4  solution_act_item::do_highlighted_changed (this=0xb1a42838,
highlighted=false) at solution_item.cc:280
#5  0xb7ce0638 in sigc::signal1<void, bool, sigc::nil>::operator()(bool
const&) const () from /usr/lib/libcwidget.so.3
#6  0xb7cd929c in cwidget::widgets::tree::unhighlight_current() () from
#7  0x08104a06 in solution_examiner::update_highlights() ()
#8  0x0810680e in
solution_examiner::update_from_state(resolver_manager::state const&) ()
#9  0x08106ed3 in solution_examiner::update() ()
#10 0xb7c7f552 in cwidget::toplevel::slot_event::dispatch() () from
#11 0xb7c811b0 in cwidget::toplevel::mainloop(int) () from
#12 0x0810d4db in ui_main () at ui.cc:2789
#13 0x08072e0d in main (argc=3, argv=0xbffff854) at main.cc:1101
(gdb) list
476      bool broken_under(const InstallationType &I) const;
478      /** \return The APT dependency associated with this abstract
dependency. */
479      pkgCache::DepIterator get_dep() const
480      {
481        return pkgCache::DepIterator(cache->GetCache(),
const_cast<pkgCache::Dependency *>(start));
482      }
484      /** \return The APT Provides relationship associated with this
485       *  abstract dependency.
(gdb) info source
Current source file is ./generic/apt/aptitude_resolver_universe.h
Compilation directory is
Located in
Contains 1399 lines.
Source language is c++.
Compiled with unknown debugging format.
Does not include preprocessor macro info.

More information about the Aptitude-devel mailing list