[BusyBox] make menuconfig issue

bhunt bhunt at micron.com
Wed Jan 22 15:45:03 UTC 2003


This isn't the first time I've seen this complaint. And since it is a rather
annoying little thing I decided to track it down. I checked out the latest
CVS from busybox and have made a patch for menubox.c that seems to fix this
for me.

Please examine it and apply it if it works for everyone.

Thanks,
Brett Hunt

I've attached the patch as well as placing it here (in case my email program
mangles the following text.

Index: scripts/config/menubox.c
===================================================================
RCS file: /var/cvs/busybox/scripts/config/menubox.c,v
retrieving revision 1.1
diff -u -b -B -w -p -r1.1 menubox.c
--- scripts/config/menubox.c	5 Dec 2002 08:41:07 -0000	1.1
+++ scripts/config/menubox.c	22 Jan 2003 21:44:06 -0000
@@ -311,8 +311,8 @@ dialog_menu (const char *title, const ch
 
                     scroll--;
 
-                    print_item (menu, items[scroll * 2]->name, 0, FALSE,
-                               (items[scroll * 2]->tag[0] != ':'));
+                    print_item (menu, items[scroll]->name, 0, FALSE,
+                               (items[scroll]->tag[0] != ':'));
 		} else
 		    choice = MAX(choice - 1, 0);
 
@@ -343,8 +343,8 @@ dialog_menu (const char *title, const ch
                     if (scroll > 0) {
                 	wscrl (menu, -1);
                 	scroll--;
-                	print_item (menu, items[scroll * 2]->name, 0, FALSE,
-                	(items[scroll * 2]->tag[0] != ':'));
+                	print_item (menu, items[scroll]->name, 0, FALSE,
+                	(items[scroll]->tag[0] != ':'));
                     } else {
                         if (choice > 0)
                             choice--;

> -----Original Message-----
> From: Andrew Dennison [mailto:andrew.dennison at motec.com.au]
> Sent: Tuesday, January 21, 2003 10:07 PM
> To: busybox
> Subject: [BusyBox] make menuconfig issue
> 
> 
> I've grabbed the development version of busybox via cvs as it 
> seems to have
> a few nice things that aren't present in the stable version. 
> However on my
> system (RH7.0 with some updates) "make menuconfig" crashes with a
> Segmentation fault when scrolling the menus, but only in 
> menus that have a
> separator ("---"). This only happens if I scroll down far 
> enough for the
> item below the separator to be displayed, then scroll back up.
> 
> Anyone else had a problem with this? The uClibc-0.9.16 
> menuconfig works ok
> for me on the same box. Steps to reproduce this are below.
> 
> Andrew
> 
> # make menuconfig
> 
> This works ok:
> On the top level config menu, scroll down (using cursors or 
> +) until the
> separator is displayed (see below) then scroll back up. No problem.
> 
>   ? ?             System Logging Utilities  --->
>   ? ?             Text Utilities  --->
>   ? ?             Linux System Utilities  --->
>   ? ?             Debugging Options  --->
>   ? ?             ---
> 
> This Seg faults:
> scroll down until the separator and ONE MORE item are 
> displayed (see below)
> then scroll back up. Crashes on the key press that would move 
> the cursor
> onto "Networking Utilities" and hence should cause the menu 
> items to scroll.
> 
>   ? ?             Networking Utilities  --->
>   ? ?             Process Utilities  --->
>   ? ?             Another Bourne-like Shell  --->
>   ? ?             Shell Utilities  --->
>   ? ?             System Logging Utilities  --->
>   ? ?             Text Utilities  --->
>   ? ?             Linux System Utilities  --->
>   ? ?             Debugging Options  --->
>   ? ?             ---
>   ? ?             Load an Alternate Configuration File
> 
> I added a -g to HOSTCFLAGS in Rules.mak and GDB says the 
> following about the
> core dump - the important bit is that items points to 0xffffffff.
> 
> Core was generated by `./scripts/config/mconf 
> sysdeps/linux/Config.in'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/lib/libncurses.so.5...done.
> Loaded symbols for /usr/lib/libncurses.so.5
> Reading symbols from /lib/libc.so.6...done.
> Loaded symbols for /lib/libc.so.6
> Reading symbols from /lib/ld-linux.so.2...done.
> Loaded symbols for /lib/ld-linux.so.2
> #0  0x804c035 in dialog_menu (title=0x80a7af8 "l\005`",
>     prompt=0xffffffff <Address 0xffffffff out of bounds>, height=0,
>     width=134904872, menu_height=-1, current=0x0, item_no=134905176,
>     items=0xffffffff) at menubox.c:314
> 314                         print_item (menu, items[scroll * 
> 2]->name, 0,
> FALSE,
> 
> 
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/mailman/listinfo/busybox
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: menubox.patch
Type: application/octet-stream
Size: 1269 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20030122/5e713046/attachment.obj 


More information about the busybox mailing list