On Tue, 19 Feb 2008, Denys Vlasenko wrote: > Is this on x86 with .config I sent?
No. It's my config. Comes in an attachment.
> Which line is "LINE 5952" (which is last seen before segfault I guess)?
See below.
> Let's make it simpler to read. Replace "LINE n" messages with "Line A",
> "Line B" etc. Paste into email C code where you have these prints
> so that reader can see where each "Line X" is.
>
> For example:
Alright. Let's see...
Code:
5900 case '9':
5901 num = atoi(name);
5902 if (num < 0 || num > shellparam.nparam)
5903 return -1;
5904 p = num ? shellparam.p[num - 1] : arg0;
5905 goto value;
5906 default:
5907 bb_error_msg("(A) LINE %d", __LINE__);
5908 /* NB: name has form "VAR=..." */
5909
5910 /* "A=a B=$A" case: var_str_list is a list of "A=a"
strings
5911 * which should be considered before we check
variables. */
5912 if (var_str_list) {
5913 unsigned name_len = (strchrnul(name, '=') -
name) + 1;
5914 bb_error_msg("(B) LINE %d: name='%s',
name_len=%u", __LINE__, name, name_len);
5915 p = NULL;
5916 bb_error_msg("(C) LINE %d", __LINE__);
5917 do {
5918 char *eq;
5919 char *str = var_str_list->text;
5920 bb_error_msg("(D) LINE %d:
var_str_list: %p, str: %p '%s'", __LINE__, var_str_list, str, str);
5921 if (!str)
5922 break;
5923 bb_error_msg("(E) LINE %d", __LINE__);
5924 eq = strchr(str, '=');
5925 bb_error_msg("(F) LINE %d", __LINE__);
5926 if (!eq) /* stop at first
non-assignment */
5927 break;
5928 bb_error_msg("(G) LINE %d", __LINE__);
5929 eq++;
5930 bb_error_msg("(H) LINE %d", __LINE__);
5931 if (name_len == (eq - str)
5932 && strncmp(str, name, name_len) == 0) {
5933 bb_error_msg("(I) LINE %d",
__LINE__);
5934 p = eq;
5935 /* goto value; - WRONG! */
5936 /* think "A=1 A=2 B=$A" */
5937 bb_error_msg("(J) LINE %d",
__LINE__);
5938 }
5939 bb_error_msg("(K) LINE %d", __LINE__);
5940 var_str_list = var_str_list->next;
5941 bb_error_msg("(L) LINE %d", __LINE__);
5942 } while (var_str_list);
5943 bb_error_msg("(M) LINE %d", __LINE__);
5944 if (p)
5945 goto value;
5946 bb_error_msg("(N) LINE %d", __LINE__);
5947 }
5948 bb_error_msg("(O) LINE %d", __LINE__);
5949 p = lookupvar(name);
5950 bb_error_msg("(P) LINE %d", __LINE__);
5951 value:
5952 bb_error_msg("(Q) LINE %d", __LINE__);
5953 if (!p)
5954 return -1;
Script:
# cat -n ../z
1 RUNLEVEL=3
2 for B in $RUNLEVEL; do echo $B;done
3
4 for B in $RUNLEVE; do echo $B;done
Result:
See attatched ash.z.err.gz (contains unprintable characters).
Cheers,
--
Cristian
bb-config.bz2
Description: Binary data
ash.z.err.bz2
Description: Binary data
_______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
