Opened 5 weeks ago

Closed 4 weeks ago

#31687 closed defect (fixed)

FreeBSD compilation warns with Tor 0.4.1.5

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version: Tor: 0.4.1.5
Severity: Normal Keywords: consider-backport-immediately warning compiler 042-should 041-backport 040-backport 035-backport BugSmashFund
Cc: Actual Points: .1
Parent ID: Points:
Reviewer: ahf Sponsor:

Description

On tor-dev, grarpamp reports:

src/core/or/connection_edge.c:2563:5: warning: potential null pointer
dereference [-Wnull-dereference]
src/lib/math/fp.c:106:16: warning: conversion from 'double' to 'float'
may change value [-Wfloat-conversion]
src/lib/math/fp.c:111:18: warning: conversion from 'double' to 'float'
may change value [-Wfloat-conversion]
src/lib/math/fp.c:136:16: warning: conversion from 'double' to 'float'
may change value [-Wfloat-conversion]
src/lib/math/fp.c:88:13: warning: conversion from 'double' to 'float'
may change value [-Wfloat-conversion]

Child Tickets

Change History (12)

comment:1 Changed 5 weeks ago by nickm

Keywords: BugSmashFund added

comment:2 Changed 5 weeks ago by nickm

Owner: set to nickm
Status: newaccepted

comment:3 Changed 5 weeks ago by nickm

Keywords: 042-should 041-backport 040-backport 035-backport added; 041-should removed
Milestone: Tor: 0.4.1.x-finalTor: 0.4.2.x-final
Status: acceptedneeds_review

It turns out that these warnings have been here a long time, so I've made ticket31687_035 based on maint-0.3.5 for them.

I've made a PR at https://github.com/torproject/tor/pull/1314 to check for CI regressions, but I don't have a FreeBSD installation to test this on.

comment:4 Changed 5 weeks ago by nickm

Actual Points: .1

comment:5 Changed 5 weeks ago by nickm

grarmamp confirms the fix, but notes that another instance of the bug exists. Apparently we started using these macros a second time in 0.4.0, for tor_isinf(). I've added a new branch ticket31687_040 to be merged into 0.4.0 and forward to fix the issue there as well. PR at https://github.com/torproject/tor/pull/1323

comment:6 Changed 4 weeks ago by asn

Reviewer: ahf

comment:7 Changed 4 weeks ago by ahf

Status: needs_reviewmerge_ready

Looks good.

comment:8 Changed 4 weeks ago by nickm

Keywords: asn-merge added

comment:9 Changed 4 weeks ago by asn

Keywords: asn-merge removed

Merged. Leaving ticket open for bakcport.

comment:10 Changed 4 weeks ago by nickm

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

comment:11 Changed 4 weeks ago by teor

Keywords: consider-backport-immediately added

This is a compiler warning fix, which should be fine to backport after it passes CI.

Here are the PRs:

comment:12 Changed 4 weeks ago by nickm

Resolution: fixed
Status: merge_readyclosed

Merged to 0.3.5, 0.4.0, and forward.

Note: See TracTickets for help on using tickets.