Opened 11 months ago

Closed 9 months ago

#31897 closed defect (fixed)

util/map_anon_nofork test fails on SunOS

Reported by: svschmel Owned by: teor
Priority: High Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Normal Keywords: tor-test, 042-must, fast-fix, 041-regression, BugSmashFund, 041-backport, consider-backport-after-04233
Cc: svschmel Actual Points: 0.1
Parent ID: Points: 0.1
Reviewer: ahf Sponsor:


I get the following error on SunOS:

uname -a
SunOS oibuild 5.11 illumos-e7a617a7b6 i86pc i386 i86pc

FAIL: src/test/test

util/load_win_lib: SKIPPED
util/log_mallinfo: SKIPPED
  FAIL /export/home/svschmel/oi-userland/components/network/tor/tor- assert(buf[0] OP_EQ 0xd0): -48 vs 208
  [map_anon_nofork FAILED]
1/1360 TESTS FAILED. (2 skipped)
FAIL src/test/test (exit status: 1)

Child Tickets

#31948closednickmCID 1454593: passing negative value to memsetCore Tor/Tor

Attachments (1)

test-suite.log (56.6 KB) - added by svschmel 11 months ago.

Download all attachments as: .zip

Change History (14)

Changed 11 months ago by svschmel

Attachment: test-suite.log added

comment:1 Changed 11 months ago by teor

Keywords: 042-must fast-fix 041-regression added
Milestone: Tor: 0.4.2.x-final
Points: 0.1

This looks like a simple signed / unsigned comparison error.

comment:2 Changed 11 months ago by nickm

Priority: MediumHigh

comment:3 Changed 11 months ago by teor

Owner: set to teor
Status: newassigned
Version: Tor:

comment:4 Changed 11 months ago by teor

Actual Points: 0.1
Keywords: BugSmashFund 041-backport consider-backport-after-0433 added
Status: assignedneeds_review

See my PR:

The merge to master was clean, here is the test PR:

comment:5 Changed 11 months ago by teor

Keywords: consider-backport-after-04233 added; consider-backport-after-0433 removed

comment:6 Changed 11 months ago by asn

Reviewer: ahf

comment:7 Changed 11 months ago by svschmel


i can commit that this fix works.
Quick and dirty test:

svschmel@oibuild:~/oi-userland/components/network/tor/tor-$ wget

--2019-10-01 12:29:26--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 202187 (197K) [text/plain]
Saving to: 'test_util.c.1'

test_util.c.1 100%[=================================================================>] 197.45K --.-KB/s in 0.1s

2019-10-01 12:29:26 (1.61 MB/s) - 'test_util.c.1' saved [202187/202187]


svschmel@oibuild:~/oi-userland/components/network/tor/tor-$ ls -al test_uti*
-rw-r--r-- 1 svschmel staff 202147 Jun 10 14:46 test_util.c
-rw-r--r-- 1 svschmel staff 202187 Oct 1 12:29 test_util.c.1
-rw-r--r-- 1 svschmel staff 11624 Jun 10 14:46 test_util_format.c
-rw-r--r-- 1 svschmel staff 1814 Jun 10 14:46 test_util_process.c


svschmel@oibuild:~/oi-userland/components/network/tor/tor-$ cp test_util.c.1 test_util.c


svschmel@oibuild:~/oi-userland/components/network/tor$ gmake test
(cd /export/home/svschmel/oi-userland/components/network/tor/build/amd64 ; \

/usr/bin/env PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/usr/perl5/bin \
/usr/gnu/bin/make \


make[1]: Entering directory '/export/home/svschmel/oi-userland/components/network/tor/build/amd64'

CC src/test/src_test_test-test_util.o
CCLD src/test/test

/usr/gnu/bin/make check-TESTS check-local
make[2]: Entering directory '/export/home/svschmel/oi-userland/components/network/tor/build/amd64'
make[3]: Entering directory '/export/home/svschmel/oi-userland/components/network/tor/build/amd64'
PASS: src/test/test
PASS: src/test/test-slow
PASS: src/test/test-memwipe
PASS: src/test/test_workqueue
PASS: src/test/
PASS: src/test/
PASS: src/test/test-timers
SKIP: src/test/
PASS: src/test/
PASS: src/test/
PASS: src/test/
PASS: src/test/
PASS: src/test/
PASS: src/test/
PASS: src/test/
SKIP: src/test/
PASS: src/test/
SKIP: src/test/
PASS: src/test/
PASS: src/test/
Testsuite summary for tor
# TOTAL: 20
# PASS: 17
# SKIP: 3
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
make[3]: Leaving directory '/export/home/svschmel/oi-userland/components/network/tor/build/amd64'
perl /export/home/svschmel/oi-userland/components/network/tor/tor- -C \

/export/home/svschmel/oi-userland/components/network/tor/tor-*/*.[ch] /export/home/svschmel/oi-userland/components/network/tor/tor-*/*.[ch] /export/home/svschmel/oi-userland/components/network/tor/tor-*/*.[ch] /export/home/svschmel/oi-userland/components/network/tor/tor-*/*.[ch] /export/home/svschmel/oi-userland/components/network/tor/tor-*.[ch] /export/home/svschmel/oi-userland/components/network/tor/tor-*/*.[ch] /export/home/svschmel/oi-userland/components/network/tor/tor-*.[ch]

python3 /export/home/svschmel/oi-userland/components/network/tor/tor-
if command -v shellcheck; then \

find /export/home/svschmel/oi-userland/components/network/tor/tor- -name "*.sh" -exec shellcheck {} +; \
if [ -d "/export/home/svschmel/oi-userland/components/network/tor/tor-" ]; then \

shellcheck /export/home/svschmel/oi-userland/components/network/tor/tor- /export/home/svschmel/oi-userland/components/network/tor/tor-; \

fi; \

make[2]: Leaving directory '/export/home/svschmel/oi-userland/components/network/tor/build/amd64'
make[1]: Leaving directory '/export/home/svschmel/oi-userland/components/network/tor/build/amd64'
/usr/bin/touch /export/home/svschmel/oi-userland/components/network/tor/build/amd64/.tested

comment:8 Changed 10 months ago by ahf

Status: needs_reviewmerge_ready

Patch looks good. And thanks for testing this on a SunOS machine :-)

comment:9 Changed 10 months ago by nickm

Keywords: asn-merge added

comment:10 Changed 10 months ago by nickm

Milestone: Tor: 0.4.2.x-finalTor: 0.4.1.x-final

Merged to master, marking for backport.

comment:11 Changed 10 months ago by asn

Keywords: asn-merge removed

comment:12 Changed 10 months ago by teor

I cherry-picked #31948 to the 0.4.1 backport branch, because it is a fix on this change.

comment:13 Changed 9 months ago by teor

Resolution: fixed
Status: merge_readyclosed

Merged to 0.4.1 and later.
Merged #31107, #31466, #30916, #31408, #31837, and #31897 together.

Note: See TracTickets for help on using tickets.