[lkml]   [2001]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Is this the ultimate stack-smash fix?
On Sat, Feb 17, 2001 at 09:53:48PM -0700, Eric W. Biederman wrote:
> Peter Samuelson <> writes:
> > It also sounds like you will be
> > breaking the extremely useful C postulate that, at the ABI level at
> > least, arrays and pointers are equivalent. I can't see *how* you plan
> > to work around that one.
> Huh? Pointers and arrays are clearly different at the ABI level.
> A pointer is a word that contains an address of something.
> An array is an array.

An array is a word that contains the address of the first element.

Exercise 1: What is the difference between the following two
declarations at the source level and at the ABI level?

a) int main(int argc, char *argv[])
b) int main(int argc, char **argv)

Exercise 2: What would the following in hypothetical C startup code do?

char *args[10];
int count = 10;


exit(main(count - 1, args + 1));

Andreas E. Bombe <> DSA key 0x04880A44
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:17    [W:0.093 / U:2.716 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site