TLS 1.3 broke the non-debug build with GCC 4.8.4

RESOLVED FIXED

Status

NSS
Libraries
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jld, Unassigned)

Tracking

(Blocks: 1 bug)

trunk

Firefox Tracking Flags

(firefox47 affected)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
The NSS build, with BUILD_OPT=1, now fails thusly:

tls13con.c: In function ‘tls13_SetHsState’:
tls13con.c:153:17: error: unused variable ‘new_state_name’ [-Werror=unused-variable]
     const char *new_state_name = tls13_HandshakeState(ws);
                 ^
tls13con.c: In function ‘tls13_DeriveTrafficKeys’:
tls13con.c:1015:24: error: unused variable ‘n’ [-Werror=unused-variable]
     EXPAND_TRAFFIC_KEY(kHkdfPurposeClientWriteKey, client.write_key);
                        ^
tls13con.c:1016:24: error: unused variable ‘n’ [-Werror=unused-variable]
     EXPAND_TRAFFIC_KEY(kHkdfPurposeServerWriteKey, server.write_key);
                        ^
tls13con.c:1017:24: error: unused variable ‘n’ [-Werror=unused-variable]
     EXPAND_TRAFFIC_IV(kHkdfPurposeClientWriteIv, client.write_iv);
                        ^
tls13con.c:1018:24: error: unused variable ‘n’ [-Werror=unused-variable]
     EXPAND_TRAFFIC_IV(kHkdfPurposeServerWriteIv, server.write_iv);

From a quick look at the code, these all seem to be variables used only for assertions or debug logging.  The compiler in question:

$ gcc --version
gcc-4.8.real (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4

Comment 1

2 years ago
Created attachment 8715122 [details] [diff] [review]
0001-Fix-opt-build-unused-variables.patch

Comment 2

2 years ago
Comment on attachment 8715122 [details] [diff] [review]
0001-Fix-opt-build-unused-variables.patch

Review of attachment 8715122 [details] [diff] [review]:
-----------------------------------------------------------------

This should fix it.
Attachment #8715122 - Flags: review?(martin.thomson)

Comment 3

2 years ago
Jed, can you see if this fixes the problem
Flags: needinfo?(jld)

Updated

2 years ago
Attachment #8715122 - Flags: review?(martin.thomson) → review+
(Reporter)

Comment 4

2 years ago
Comment on attachment 8715122 [details] [diff] [review]
0001-Fix-opt-build-unused-variables.patch

Works for me.  Thanks!
Flags: needinfo?(jld)
Attachment #8715122 - Flags: feedback+
(Reporter)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.