Opened 2 months ago

Closed 4 weeks ago

#29145 closed defect (fixed)

Fix a compiler warning on OpenBSD in test-memwipe.c

Reported by: kjak Owned by:
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: 041-proposed 029-backport 033-backport 034-backport 035-backport 040-backport
Cc: Actual Points:
Parent ID: Points: 0.1
Reviewer: ahf Sponsor:

Description

In test-memwipe.c, malloc_options needs to be declared extern:

src/test/test-memwipe.c:50:13: warning: no previous extern declaration for non-static variable 'malloc_options' [-Wmissing-variable-declarations]
const char *malloc_options="sufjj";

(malloc_options is only used on OpenBSD)

PR to follow.

Child Tickets

Change History (11)

comment:1 Changed 2 months ago by kjak

Status: newneeds_review

comment:2 Changed 2 months ago by teor

Keywords: 041-proposed added
Milestone: Tor: 0.4.1.x-final
Points: 0.1

Let's review this in 0.4.1, without discussing it at the team meeting.

comment:3 Changed 6 weeks ago by dgoulet

Reviewer: teor

comment:4 Changed 6 weeks ago by dgoulet

Reviewer: teorahf

(Mistake while assigning. These should go to ahf as a Reviewer.)

comment:5 Changed 6 weeks ago by ahf

Status: needs_reviewmerge_ready

LGTM. For the merger: I had to look up why this symbol needs global linkage instead of just static linkage. You can see the documentation for these flags at https://man.openbsd.org/malloc#MALLOC_OPTIONS

comment:6 Changed 6 weeks ago by kjak

Great. Thanks for reviewing.

And ugh, yeah, I should have provided some more details in the ticket description. Sorry about that!

comment:7 in reply to:  6 Changed 6 weeks ago by ahf

Replying to kjak:

And ugh, yeah, I should have provided some more details in the ticket description. Sorry about that!

No worries at all. The Tor "network team" is usually good at catching warnings on Linux, Windows, and FreeBSD, so we are always very happy when people catches issues on other operating systems. Thanks a lot for contributing to Tor! :-)

comment:8 Changed 6 weeks ago by nickm

Keywords: 029-backport 033-backport 034-backport 035-backport 040-backport added

comment:9 Changed 5 weeks ago by nickm

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

Thanks! Since this is a backport candidate, I've made a new branch as bug29145_029 and a PR https://github.com/torproject/tor/pull/711.

I've also merged the branch to 0.4.0 and forward.

Marking for possible backport.

comment:10 Changed 5 weeks ago by teor

(This branch was accidentally pushed to https://gitweb.torproject.org/tor.git/
See #29531 for the delete request, and #29532 for the permanent fix.)

comment:11 Changed 4 weeks ago by teor

Resolution: fixed
Status: merge_readyclosed

This ticket has been in 0.4.0 and master for a week.
It's small, low-risk, and it only affects OpenBSD.

Backported to 0.2.9 and later.

Note: See TracTickets for help on using tickets.