[BusyBox 0000796]: Applet name wrong in applets struct

bugs at busybox.net bugs at busybox.net
Wed Nov 29 14:42:38 UTC 2006


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=796 
====================================================================== 
Reported By:                ph
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   796
Category:                   Documentation
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             03-24-2006 04:42 PST
Last Modified:              11-29-2006 06:42 PST
====================================================================== 
Summary:                    Applet name wrong in applets struct
Description: 
I'm experiencing a strange problem with busybox (latest version from CVS)
on uClinux running on Microblaze. The problem is as follows:

I enable the vi applet in the BB config in uClinux, compiles it and
downloads to target. When I try to run "vi", busybox just gives me the
same printout as I get when I run "busybox". In the list of currently
defined functions, the vi string is missing like this:

"tar, test, time, touch, true, umount, uname, uptime, , wget, yes"
                                                     ^vi should go here

If I modifiy busybox.c main() and adds a for-loop printing out all applet
names from the applet-struct it works! The for-loop is addded immediately
before the run_applet_by_name() call. applets[XX]->name (XX eq. vi
position) then points to a string among all the other strings for the
names of the other applets.

If I instead removes the printout from the main() and does the same
printout first thing in the run_applet_by_name() function in applets.c, I
get another result! Now applets[XX]->name points to a different area of
the memory containing the value 0 -- the string seems empty. This result
in the bsearch failing and the vi applet never executes!

If I don't enable the vi applet in the config some other application in
end of the applets struct gets it's name crippled. I haven't managed to
see any pattern in what position in applets struct gets crippled.

Because of my limited debug tools, I really can't get that much more
information.

The for-loop used for the printout looks like this:

for (i = 50; i < 61; i++) printf("%d: 0x%.8x,0x%.8x -> %s\n", i,
applets[i].name, &applets[i].name, applets[i].name);

and a printout like this:

50: 0x25ad0638,0x25ad08dc -> tar
51: 0x25ad063c,0x25ad08e8 -> test
52: 0x25ad0644,0x25ad08f4 -> time
53: 0x25ad064c,0x25ad0900 -> touch
54: 0x25ad0654,0x25ad090c -> true
55: 0x25ad065c,0x25ad0918 -> umount
56: 0x25ad0664,0x25ad0924 -> uname
57: 0x25ad066c,0x25ad0930 -> uptime
58: 0x25ad04cc,0x25ad093c ->
59: 0x25ad0678,0x25ad0948 -> wget
60: 0x25ad0680,0x25ad0954 -> yes

I hope I can get back with more information soon.
====================================================================== 

---------------------------------------------------------------------- 
 bernhardf - 06-11-06 10:40  
---------------------------------------------------------------------- 
Please provide more information on this one. If you can reproduce it with
trunk, then please send us an update about this issue.

If you don't see it with trunk (and compressed usage turned off) then i'll
close this issue assuming that it was a problem with your toolchain.

Thanks in advance. 

---------------------------------------------------------------------- 
 bernhardf - 09-20-06 09:01  
---------------------------------------------------------------------- 
ping; Please retry with trunk and let us know what versions of toolchain on
what arch you used when this failed.

TIA 

---------------------------------------------------------------------- 
 vda - 11-21-06 04:02  
---------------------------------------------------------------------- 
Hello? Anybody alive here? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
03-24-06 04:42  ph             New Issue                                    
03-24-06 04:42  ph             Status                   new => assigned     
03-24-06 04:42  ph             Assigned To               => BusyBox         
03-26-06 22:34  ph             Issue Monitored: ph                          
06-11-06 10:40  bernhardf      Note Added: 0001414                          
09-20-06 09:01  bernhardf      Note Added: 0001644                          
11-21-06 04:02  vda            Note Added: 0001753                          
11-21-06 04:02  vda            Status                   assigned => feedback
11-29-06 06:42  vda            Status                   feedback => closed  
======================================================================




More information about the busybox-cvs mailing list