This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: random global function name
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Nathan Sidwell <nathan at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 08 Jul 2003 16:24:09 -0700
- Subject: Re: [PATCH]: random global function name
- References: <3F06F3F4.3020600@codesourcery.com><20030708225503.GB481@redhat.com>
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