[PATCH]: random global function name

Zack Weinberg zack@codesourcery.com
Tue Jul 8 23:25:00 GMT 2003


Richard Henderson <rth@redhat.com> writes:

> On Sat, Jul 05, 2003 at 04:51:16PM +0100, Nathan Sidwell wrote:
>> This patch replaces the append_random_chars function with a crc32, and
>> hence removes a use of clean_symbol_name -- it seems silly to generate
>> a random string in a complicated manner, and then strip it of bogus chars.
>> The crc32_string function will be used from elsewhere.
>
> I don't like this at all.  We've reduced the amount of 
> uniqueness from a complete pathname (which is almost
> certainly unique within a given project, at least), to
> a 32-bit value.

It's pretty easy to make CRC32 collide, too.

A base64 encoded MD5 sum is only 22 characters; that might be a good
choice (it would of course be necessary to replace / with _ in the
character set)

zw



More information about the Gcc-patches mailing list