Opened 2 years ago

Closed 2 years ago

#23023 closed defect (fixed)

test: some prop224 unit tests fail only sometimes

Reported by: dgoulet Owned by: dgoulet
Priority: Medium Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-tests, prop224, tor-hs
Cc: Actual Points:
Parent ID: Points: 0.1
Reviewer: Sponsor: SponsorR-can


Diagnostic from nickm.

11:44 <+nickm> dgoulet, asn: There are two bugs in test_hs_service.c that make it fail sometimes
11:44 <+nickm> on line 541
11:45 <+nickm> bug 1: you're setting one byte of the public key to 0x42.  But that byte might already be 0x42!
11:45 <+nickm> Instead use xor
11:45 <+nickm> bug 2: You are changing the key of an item that's already inserted in the hashtable.
11:45 <+nickm> That can fail when you go to  insert the item with the changed key
11:46 <+nickm> because with probability 1/N_BUCKETS, the item with the changed key will go into the same bucket as it went into the first time...

Child Tickets

Change History (2)

comment:1 Changed 2 years ago by dgoulet

Status: newneeds_review

See branch bug23023_032_01.

comment:2 Changed 2 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed


Note: See TracTickets for help on using tickets.