Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#1808 closed defect (fixed)

Unit test failure on FreeBSD 7.1 at test.c:1053

Reported by: edmanm Owned by:
Priority: Medium Milestone:
Component: Core Tor/Tor Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


From my buildbot output:

rend_fns: Aug 07 08:14:10.791 [info] rend_encode_v2_descriptors(): Successfully encoded a v2 descriptor and confirmed that it is parsable.
Aug 07 08:14:10.791 [warn] Introduction point onion port "0" is invalid

  FAIL test.c:1053: assert((rend_parse_introduction_points(parsed, intro_points_encrypted, intro_points_size)) == (3)): -1 vs 3
  [rend_fns FAILED]

Child Tickets

Change History (4)

comment:1 Changed 10 years ago by nickm

Odd. I don't see what would have caused that among anything we changed recently. Bizarrely, it seems like previous builds from the same Git revision did pass if I am right.

Did anything change on the freebsd build host, maybe? Any upgraded libraries, etc?

comment:2 Changed 10 years ago by edmanm

Yes, previous and subsequent builds have passed. Nothing has changed on the FreeBSD host for many months either. Note that that test randomly generates ports though:

1032     intro->extend_info->port = crypto_rand_int(65536);

For that particular test run, it appears to have simply randomly generated a 0. You can force that test to fail with the message in the ticket by just changing that line to:

1032     intro->extend_info->port = 0;

So it's really just the test that is not recognizing that Tor is doing the right thing in that situation, assuming you really do want to reject 0 as an intro point port.

comment:3 Changed 10 years ago by nickm

Resolution: fixed
Status: newclosed

Oh neat. Yeah, that's an easy fix; just make it crypto_rand_int(65535)+1.

Committed as f060b18e;; thanks!

comment:4 Changed 8 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.