Openmoko Bug #1695: opkg r4562 segfaults like hell

Openmoko Public Trac bugs at docs.openmoko.org
Wed Jul 30 15:57:03 CEST 2008


#1695: opkg r4562 segfaults like hell
---------------------+------------------------------------------------------
 Reporter:  koen     |        Owner:  tick            
     Type:  defect   |       Status:  accepted        
 Priority:  highest  |    Milestone:                  
Component:  opkg     |      Version:  current svn head
 Severity:  blocker  |   Resolution:                  
 Keywords:           |     Blocking:                  
Blockedby:           |  
---------------------+------------------------------------------------------

Comment(by tick):

 I think I found the reason:


 The package use the installed_files without get and free


 Index: pkg_hash.c
 ===================================================================
 --- pkg_hash.c  (revision 4562)
 +++ pkg_hash.c  (working copy)
 @@ -648,10 +648,12 @@
       // opkg_message(conf, OPKG_DEBUG2, "owning_pkg=%s filename=%s\n",
 owning_pkg->name, file_name);
       hash_table_insert(file_hash, file_name, owning_pkg);
       if (old_owning_pkg) {
 +         pkg_get_installed_files(old_owning_pkg);
           str_list_remove_elt(old_owning_pkg->installed_files, file_name);
 +         pkg_free_installed_files(old_owning_pkg);
           /* mark this package to have its filelist written */
           old_owning_pkg->state_flag |= SF_FILELIST_CHANGED;
           owning_pkg->state_flag |= SF_FILELIST_CHANGED;
       }
       return 0;
  }

-- 
Ticket URL: <https://docs.openmoko.org/trac/ticket/1695#comment:4>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac


More information about the buglog mailing list