[tor-bugs] #27772 [Core Tor/Tor]: Compile without warnings on GCC 8.2.0 with LTO enabled
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Sep 18 17:09:52 UTC 2018
#27772: Compile without warnings on GCC 8.2.0 with LTO enabled
--------------------------+------------------------------------
Reporter: nickm | Owner: nickm
Type: defect | Status: assigned
Priority: Medium | Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------+------------------------------------
Comment (by nickm):
Here are the warnings from src/app/tor itself:
{{{
CCLD src/app/tor
src/feature/nodelist/torcert.c: In function
‘tor_cert_sign_impl.constprop’:
src/feature/nodelist/torcert.c:55:19: warning: potential null pointer
dereference [-Wnull-dereference]
cert->exp_field = (uint32_t) CEIL_DIV(now + lifetime, 3600);
^
src/feature/nodelist/torcert.c:56:23: warning: potential null pointer
dereference [-Wnull-dereference]
cert->cert_key_type = signed_key_type;
^
src/feature/nodelist/torcert.c:54:19: warning: potential null pointer
dereference [-Wnull-dereference]
cert->cert_type = cert_type;
^
src/lib/meminfo/meminfo.c: In function ‘tor_log_mallinfo’:
src/lib/meminfo/meminfo.c:48:8: warning: function call has aggregate value
[-Waggregate-return]
mi = mallinfo();
^
src/lib/crypt_ops/crypto_pwbox.c: In function ‘crypto_pwbox’:
src/trunnel/pwbox.c:161:56: warning: potential null pointer dereference
[-Wnull-dereference]
&inp->skey_header.n_, inp->skey_header.elts_, newlen,
^
src/core/mainloop/connection.c: In function ‘connection_free_minimal’:
src/core/mainloop/connection.c:665:12: warning: null pointer dereference
[-Wnull-dereference]
if (!CHANNEL_FINISHED(TLS_CHAN_TO_BASE(or_conn->chan))) {
^
src/feature/nodelist/routerparse.c: In function
‘router_parse_addr_policy.part.2’:
lto1: warning: function may return address of local variable [-Wreturn-
local-addr]
src/feature/nodelist/routerparse.c:4406:17: note: declared here
addr_policy_t newe;
^
src/core/proto/proto_socks.c: In function
‘socks_request_set_socks5_error’:
src/trunnel/socks5.c:3075:16: warning: null pointer dereference [-Wnull-
dereference]
inp->version = val;
^
src/trunnel/socks5.c:3563:14: warning: null pointer dereference [-Wnull-
dereference]
inp->reply = val;
^
src/trunnel/socks5.c:3116:14: warning: null pointer dereference [-Wnull-
dereference]
inp->atype = val;
^
src/core/or/scheduler_kist.c: In function ‘update_socket_info_impl’:
src/core/or/scheduler_kist.c:198:5: warning: potential null pointer
dereference [-Wnull-dereference]
TO_CONN(BASE_CHAN_TO_TLS((channel_t *) ent->chan)->conn)->s;
^
src/core/proto/proto_socks.c: In function ‘fetch_from_buf_socks’:
src/trunnel/socks5.c:2690:16: warning: potential null pointer dereference
[-Wnull-dereference]
inp->version = val;
^
src/core/or/scheduler_kist.c: In function ‘channel_write_to_kernel’:
src/core/or/scheduler_kist.c:457:27: warning: potential null pointer
dereference [-Wnull-dereference]
connection_handle_write(TO_CONN(BASE_CHAN_TO_TLS(chan)->conn), 0);
^
src/core/or/channelpadding.c: In function
‘channelpadding_send_enable_command’:
src/core/or/channelpadding.c:331:3: warning: potential null pointer
dereference [-Wnull-dereference]
tor_assert(BASE_CHAN_TO_TLS(chan)->conn->link_proto >=
^
src/core/or/channelpadding.c: In function
‘channelpadding_send_disable_command’:
src/core/or/channelpadding.c:299:3: warning: potential null pointer
dereference [-Wnull-dereference]
tor_assert(BASE_CHAN_TO_TLS(chan)->conn->link_proto >=
^
src/core/or/channel.c: In function
‘channel_rsa_id_group_set_badness.isra.10.part.11’:
src/core/or/channel.c:3436:54: warning: potential null pointer dereference
[-Wnull-dereference]
smartlist_add(or_conns, BASE_CHAN_TO_TLS(channel)->conn);
^
src/lib/meminfo/meminfo.c: In function ‘signal_callback’:
src/lib/meminfo/meminfo.c:48:8: warning: function call has aggregate value
[-Waggregate-return]
mi = mallinfo();
^
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27772#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list