processone / fast_tls

TLS / SSL OpenSSL-based native driver for Erlang / Elixir
https://www.ejabberd.im
Other
83 stars 37 forks source link

build issues with 1.1.5 #46

Closed debalance closed 4 years ago

debalance commented 4 years ago

Hi, I have problems building fast_tls 1.15, it succeeds on one system and fails on another, even though I use identical pbuilder chroots for the build process. The full build log is attached.

erlang-p1-tls_1.1.5-1_amd64.build.txt

The relevant part begins at line 3081 with

rebar eunit skip_deps=true -vv

darix commented 4 years ago

We observed the same issue with the opensuse package. sometimes it happens in the coverage path, sometimes in the test path, sometimes in both.

debalance commented 4 years ago

Looking at https://buildd.debian.org/status/package.php?p=erlang-p1-tls it seems that less powerful systems are affected more often. In my case it failed on a 4th gen Intel i3 but succeeded on a 5th gen Intel i5.

prefiks commented 4 years ago

Hello,

Could you please check 52f9244780dd79f1868469d3db81b161cf32b6ab to see if this fixes this issue, looks like this is caused by code coverage triggering module reload.

darix commented 4 years ago

It seems to help. One compiler warning I see on very recent GCCs

Compiling c_src/fast_tls.c
c_src/fast_tls.c: In function 'tls_get_peer_finished_nif':
c_src/fast_tls.c:1233:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
 1233 |     if (!buf)
      |     ^~
c_src/fast_tls.c:1236:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
 1236 |  (void) SSL_get_peer_finished(state->ssl, buf, len);
      |  ^
c_src/fast_tls.c: In function 'tls_get_finished_nif':
c_src/fast_tls.c:1250:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
 1250 |     if (!buf)
      |     ^~
c_src/fast_tls.c:1253:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
 1253 |  (void) SSL_get_finished(state->ssl, buf, len);
      |  ^
prefiks commented 4 years ago

Thanks, i commited ceb277f5b172d94ec2a0c8b13cfb7e887961b55a that should stop that warning.

debalance commented 4 years ago

That seems to solve the problem for me, thx!