On Sat, Aug 30, 2014 at 02:00:13PM +0800, Xishi Qiu wrote: > On 2014/8/30 13:35, Rich Felker wrote: > > program's memory. So why should passing -1 be safe? This is not a bug > > in uclibc, just in the caller that's passing an invalid pointer, which > > is (always) undefined behavior.
> But in x86(use glibc), I tested the program too, it just return an error > number, > not segment fault. I think glibc direct use the user's buf, and syscall > return faild. > Well, do you mean this is not a bug, and need not to change the uclibc? If the behaviour is undefined by the applicable standard and such use of the library leads to a crash, it is not a bug, it is wrong usage. Whether or not a different library behaves differently does not matter. Calling it with a wrong argument is already wrong usage even when this does not lead to a crash. Rune _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
