[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Re: RFC: Fake IDs
From: |
Zack Weinberg |
Subject: |
Re: [Monotone-devel] Re: RFC: Fake IDs |
Date: |
Tue, 18 Jul 2006 17:38:42 -0700 |
On 7/18/06, Graydon Hoare <address@hidden> wrote:
Zack Weinberg wrote:
> ...
> vocab.hh provide a fake_id() function/macro that hashes __FILE__ and
> __LINE__.
Eh.. I'd prefer to turn those cases where we pick fake IDs to actually
loop, checking the db for a collision. It feels weird to be hard-coding
collision conditions into the binary, however unlikely.
I feel a little weird about it myself. I considered nonce strings
that could not possibly be a valid SHA160, but that's asking for other
problems. It seems somewhat better to have strings that are SHA160 of
_something_ than numbers that were just made up, though.
Your suggestion is interesting, however I don't always have the
database at the points where these are required. Also, it doesn't
look like there's one table to look at to determine whether a hash is
already in use...?
zw
- [Monotone-devel] RFC: Fake IDs, Zack Weinberg, 2006/07/18
- [Monotone-devel] Re: RFC: Fake IDs, Graydon Hoare, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs,
Zack Weinberg <=
- Re: [Monotone-devel] Re: RFC: Fake IDs, Jack Lloyd, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs, Nathaniel Smith, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs, Zack Weinberg, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs, Jack Lloyd, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs, Ethan Blanton, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs, Jack Lloyd, 2006/07/19
- Re: [Monotone-devel] Re: RFC: Fake IDs, Nathaniel Smith, 2006/07/19
- Re: [Monotone-devel] Re: RFC: Fake IDs, Zack Weinberg, 2006/07/19
- [Monotone-devel] Re: RFC: Fake IDs, Graydon Hoare, 2006/07/19