-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Pádraig Brady on 2/16/2009 3:07 AM:
>> +static bool
>> +have_same_content (int a_fd, int b_fd)
>> +{
>> +#define CMP_BLOCK_SIZE 65536
>> +  char a_buff[CMP_BLOCK_SIZE];
>> +  char b_buff[CMP_BLOCK_SIZE];
> 
> Is 128KiB of stack OK?

In general, no.  That is too likely to trigger stack overflow without
looking like stack overflow.  In general, any more than 4k stack
allocation in a single function is likely to cause problems.  I would feel
safer if this used malloc or static storage.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmZYn0ACgkQ84KuGfSFAYDSwACgnfmLWm69w5gqhvTc005sw9tG
OFUAoIYHHWpyjBVR4qP/UkSDXR7omiOY
=yIzh
-----END PGP SIGNATURE-----


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to