On Sul, 2005-12-04 at 19:09 -0800, Joel Becker wrote: > On Sun, Dec 04, 2005 at 05:17:09PM +0100, Matthias Andree wrote: > > There are things that old Sun Workshop versions bitch about that GCC > > deals with without complaining, and I'm not talking about C99/C++-style > > comments. C standard issue? I believe not. > > I have seen many a code like so: > > char buf[4]; > memcpy(buf, source, 5); > > accepted by the Sun compilers and run just fine. When the application > was ported to Linux/GCC, the developers complained their program > segfaulted, and "it must be something broken on Linux!" > Just because Sun's compiler does something doesn't mean it's It isnt the compiler quite often. The usual case is char buf[4]; strcpy(buf, "bits"); And those cases usually work because its a big endian box and the \00 ends up overwriting the \00 in the return address. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- Re: RFC: Starting a stable kernel series off the 2.6 kernel
- From: "Jeff V. Merkey" <[email protected]>
- Re: RFC: Starting a stable kernel series off the 2.6 kernel
- From: Matthias Andree <[email protected]>
- Re: RFC: Starting a stable kernel series off the 2.6 kernel
- From: Arjan van de Ven <[email protected]>
- Re: RFC: Starting a stable kernel series off the 2.6 kernel
- From: Matthias Andree <[email protected]>
- Re: RFC: Starting a stable kernel series off the 2.6 kernel
- From: Arjan van de Ven <[email protected]>
- Re: RFC: Starting a stable kernel series off the 2.6 kernel
- From: Matthias Andree <[email protected]>
- Re: RFC: Starting a stable kernel series off the 2.6 kernel
- From: Arjan van de Ven <[email protected]>
- Re: RFC: Starting a stable kernel series off the 2.6 kernel
- From: Matthias Andree <[email protected]>
- Re: RFC: Starting a stable kernel series off the 2.6 kernel
- From: Andreas Schwab <[email protected]>
- Re: RFC: Starting a stable kernel series off the 2.6 kernel
- From: Matthias Andree <[email protected]>
- Re: RFC: Starting a stable kernel series off the 2.6 kernel
- From: Joel Becker <[email protected]>
- Re: RFC: Starting a stable kernel series off the 2.6 kernel
- Prev by Date: Re: [stable] [PATCH] Fix oops in asus_acpi.c on Samsung P30/P35 Laptops
- Next by Date: Re: [PATCH 00/10] usb-serial: Switches from spin lock to atomic_t.
- Previous by thread: Re: RFC: Starting a stable kernel series off the 2.6 kernel
- Next by thread: Re: RFC: Starting a stable kernel series off the 2.6 kernel
- Index(es):