[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] newbie question
From:       Tito <farmatito () tiscali ! it>
Date:       2004-12-14 22:21:02
Message-ID: 200412142321.03013.farmatito () tiscali ! it
[Download RAW message or body]

On Tuesday 14 December 2004 OO:34, Jacob Marble wrote:
> Hey all-
>   OK, I've got most of a [busybox cp] + [-H -L -P] working.  It works
> fine, but when I copy from a file to another file, I get a seg fault. 
> I can't find the error in my own code.  Would someone familiar with
> internals check this out?  I'm sure it's me, but I can't figure it
> out.
>   strace returns:
> tmp $ strace busybox cp jake me
> <snip>
> close(4)                                = 0
> close(3)                                = 0
> brk(0)                                  = 0x804c000
> brk(0x806d000)                          = 0x806d000
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
> 
>   TIA,
> 
> Jacob Marble
Hi,
		if (copy_file(*argv, dest, flags))
			status = EXIT_FAILURE;
	->	/*free((void *) dest);*/
	}
removing this free avoids SEGFAULT maybe this could be a hint.

maybe dest=last=argv 
free(argv)?

Ciao,
tito
> -- 
> Families are Forever
> 
_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic