udhcpc6 segfault
Pramod Bhagwat
prbhagwat at gmail.com
Thu Aug 16 07:02:36 UTC 2012
Hi Denys,
After enabling the print i am getting following:
udhcpc6 (v1.20.2) started
udhcpc6: curr:0x480010e0
Segmentation fault
Warm Regards,
pramod
On Wed, Aug 15, 2012 at 10:27 PM, Denys Vlasenko
<vda.linux at googlemail.com> wrote:
> On Tue, Aug 14, 2012 at 4:06 PM, Pramod Bhagwat <prbhagwat at gmail.com> wrote:
>> static char **fill_envp(struct d6_packet *packet)
>> {
>> char **envp, **curr;
>>
>> client6_data.env_ptr = NULL;
>> client6_data.env_idx = 0;
>>
>> *new_env() = xasprintf("interface=%s", client_config.interface);
>>
>> if (packet)
>> option_to_env(packet->d6_options, packet->d6_options +
>> sizeof(packet->d6_options));
>>
>> envp = curr = client6_data.env_ptr;
>
> bb_error_msg("curr:%p", curr);
> bb_error_msg("curr[0]:%p", curr[0]);
>
>> while (*curr)
>
> {
> bb_error_msg("*curr:%p", *curr);
> bb_error_msg("*curr:'%s'", *curr);
>
>> putenv(*curr++);
>
> }
>
>>
>> return envp;
>> }
>>
>> In the above code while accessing curr pointer it is giving the
>> segmentation fault.
>> But client6_data.env_ptr is not NULL.
>
> Please add bb_error_msg's as shown above, run udhcpc6 again and
> let me know what it printed.
>
> --
> vda
More information about the busybox
mailing list