Daniel Burrows wrote:
<snip>
  That looks like a definite aptitude bug.  I don't know if it's causing
your crash, though.

  Could you see what happens if you apply the attached patch?

    Thanks,
  Daniel
------------------------------------------------------------------------

diff -rN -u old-head/src/generic/apt/aptcache.cc 
new-head/src/generic/apt/aptcache.cc
--- old-head/src/generic/apt/aptcache.cc        2006-11-07 17:46:59.000000000 
-0800
+++ new-head/src/generic/apt/aptcache.cc        2006-11-07 17:46:59.000000000 
-0800
@@ -226,6 +226,7 @@
       package_states[i].reinstall=false;
       package_states[i].install_reason=manual;
       package_states[i].remove_reason=manual;
+      package_states[i].selection_state = pkgCache::State::Unknown;
     }
if(WithLock && lock==-1)
diff -rN -u old-head/src/generic/apt/apt.cc new-head/src/generic/apt/apt.cc
--- old-head/src/generic/apt/apt.cc     2006-11-07 17:46:59.000000000 -0800
+++ new-head/src/generic/apt/apt.cc     2006-11-07 17:46:59.000000000 -0800
@@ -80,13 +80,13 @@
static void reset_interesting_dep_memoization()
 {
-  delete cached_deps_interesting;
+  delete[] cached_deps_interesting;
   cached_deps_interesting = NULL;
 }
static void reset_surrounding_or_memoization()
 {
-  delete cached_surrounding_or;
+  delete[] cached_surrounding_or;
   cached_surrounding_or = NULL;
 }

Thanks for your help and your patch. This fixes the new / delete mismatch. Valgrind still complains about two jumps conditional upon uninitialised values:

==25161== Conditional jump or move depends on uninitialised value(s)
==25161== at 0x4069187: pkgTagSection::Scan(char const*, unsigned long) (in /usr/lib/libapt-pkg-libc6.3-6.so.3.11.0) ==25161== by 0x82C10A5: insert_tags(pkgCache::VerIterator const&, pkgCache::VerFileIterator const&) (tags.cc:164)
==25161==    by 0x82C1A9E: load_tags(OpProgress&) (tags.cc:221)
==25161== by 0x8272FE3: apt_load_cache(OpProgress*, bool, char const*) (apt.cc:331) ==25161== by 0x81D8022: cmdline_upgrade(int, char**, char const*, bool, bool, bool, bool, bool, bool, bool, bool, bool, int) (cmdline_upgrade.cc:37)
==25161==    by 0x80E6C08: main (main.cc:480)
==25161==
==25161== Conditional jump or move depends on uninitialised value(s)
==25161== at 0x406918C: pkgTagSection::Scan(char const*, unsigned long) (in /usr/lib/libapt-pkg-libc6.3-6.so.3.11.0) ==25161== by 0x82C10A5: insert_tags(pkgCache::VerIterator const&, pkgCache::VerFileIterator const&) (tags.cc:164)
==25161==    by 0x82C1A9E: load_tags(OpProgress&) (tags.cc:221)
==25161== by 0x8272FE3: apt_load_cache(OpProgress*, bool, char const*) (apt.cc:331) ==25161== by 0x81D8022: cmdline_upgrade(int, char**, char const*, bool, bool, bool, bool, bool, bool, bool, bool, bool, int) (cmdline_upgrade.cc:37)
==25161==    by 0x80E6C08: main (main.cc:480)
==25161==
==25161== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 27 from 1)


By the way, I still get a segfault when not running under valgrind -- but I've now noticed that this is accompanied by various complaints about "Badness in handle_page_fault at arch/um/kernel/trap_kern.c:98" in /var/log/messages, so I suspect a User-Mode Linux kernel bug is causing this rather than aptitude.

-- Ed


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to