On 2024/11/08 15:30, Stuart Henderson wrote:
> On 2024/11/08 15:03, Stuart Henderson wrote:
> > On 2024/11/08 14:03, Jeremie Courreges-Anglas wrote:
> > > Great, thanks for the tests and patches.  Here's a consolidated diff
> > > (also available as ~jca/p/gdb-13-jca7.diff).
> > 
> > Thanks, that's easier :)
> > 
> > > I can't infer from gkoehler's report and yours whether 32 bits powerpc
> > > support is fine.  mips64 runtime is apparently ok but the tester hit
> > > an issue that prevented a full make fake/package.
> > > 
> > > So I'm down to requesting build results for arm, i386 and powerpc.
> > > Runtime/usage test results are welcome for any arch, but please also
> > > include data about gdb-9.2 behavior.
> > 
> > The static link to libgmp fails on i386 with familiar "relocation
> > R_386_32 cannot be used against local symbol; recompile with -fPIC"
> > errors.
> > 
> > If I add
> > 
> > LDFLAGS=       -L${LOCALBASE}/lib
> > CONFIGURE_ENV= LDFLAGS="${LDFLAGS}"
> > 
> > and *remove libgmp.a from /usr/local/lib*, it links against libgmp.so
> > and gdb build is successful.
> > 
> > (if libgmp.a is still present it tries to use that instead and fails).
> > 
> > Not yet tried runtime.
> > 
> 
> Runtime tests on i386 with the above changes:
> 
> - Light testing of runtime with a program started from gdb works.

Running the same test that tb@ tried on arm64, it looks better:

: i386.p; egdb -q openssl
Reading symbols from openssl...
(No debugging symbols found in openssl)
(gdb) b tls13_cipher_aead
Function "tls13_cipher_aead" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (tls13_cipher_aead) pending.
(gdb) run s_client -connect libressl.org:443
Starting program: /usr/bin/openssl s_client -connect libressl.org:443
CONNECTED(00000003)

Breakpoint 1, tls13_cipher_aead (cipher=0x2e82cb10 <ssl3_ciphers+1760>) at 
/usr/src/lib/libssl/tls13_lib.c:78
78              if (cipher == NULL)
(gdb) bt
#0  tls13_cipher_aead (cipher=0x2e82cb10 <ssl3_ciphers+1760>) at 
/usr/src/lib/libssl/tls13_lib.c:78
#1  0x0e853aea in tls13_client_engage_record_protection (ctx=0x78b6e180) at 
/usr/src/lib/libssl/tls13_client.c:353
#2  tls13_server_hello_recv (ctx=0x78b6e180, cbs=0xcf7c4130) at 
/usr/src/lib/libssl/tls13_client.c:492
#3  0x0e853985 in tls13_server_hello_retry_request_recv (ctx=0x78b6e180, 
cbs=0xcf7c4130)
    at /usr/src/lib/libssl/tls13_client.c:409
#4  0x0e87fbb2 in tls13_handshake_recv_action (action=0x2e82e098 
<state_machine+40>, ctx=<optimized out>)
    at /usr/src/lib/libssl/tls13_handshake.c:549
#5  tls13_handshake_perform (ctx=0x78b6e180) at 
/usr/src/lib/libssl/tls13_handshake.c:412
#6  0x0e87b51e in tls13_legacy_connect (ssl=0x73ee0c00) at 
/usr/src/lib/libssl/tls13_legacy.c:466
#7  0x0e87b026 in tls13_legacy_write_bytes (ssl=0x73ee0c00, type=23, 
vbuf=0x44c1f000, len=0)
    at /usr/src/lib/libssl/tls13_legacy.c:266
#8  0x0e85f6b8 in ssl3_write (s=0x73ee0c00, buf=0x44c1f000, len=0) at 
/usr/src/lib/libssl/s3_lib.c:2460
#9  0x17dcc03e in ?? ()
#10 0x17dc0e7d in ?? ()
#11 0x17da91f3 in ?? ()
#12 0x17da90fa in ?? ()
(gdb) n
80              if (cipher->algorithm_ssl != SSL_TLSV1_3)
(gdb)
83              switch (cipher->algorithm_enc) {
(gdb)
87                      return EVP_aead_aes_256_gcm();
(gdb) s
_lcry_EVP_aead_aes_256_gcm () at /usr/src/lib/libcrypto/evp/e_aes.c:2462
2462            return &aead_aes_256_gcm;
(gdb) bt
#0  _lcry_EVP_aead_aes_256_gcm () at /usr/src/lib/libcrypto/evp/e_aes.c:2462
#1  0x0e883b31 in tls13_cipher_aead (cipher=0x2e82cb10 <ssl3_ciphers+1760>) at 
/usr/src/lib/libssl/tls13_lib.c:87
#2  0x0e853aea in tls13_client_engage_record_protection (ctx=0x78b6e180) at 
/usr/src/lib/libssl/tls13_client.c:353
#3  tls13_server_hello_recv (ctx=0x78b6e180, cbs=0xcf7c4130) at 
/usr/src/lib/libssl/tls13_client.c:492
#4  0x0e853985 in tls13_server_hello_retry_request_recv (ctx=0x78b6e180, 
cbs=0xcf7c4130)
    at /usr/src/lib/libssl/tls13_client.c:409
#5  0x0e87fbb2 in tls13_handshake_recv_action (action=0x2e82e098 
<state_machine+40>, ctx=<optimized out>)
    at /usr/src/lib/libssl/tls13_handshake.c:549
#6  tls13_handshake_perform (ctx=0x78b6e180) at 
/usr/src/lib/libssl/tls13_handshake.c:412
#7  0x0e87b51e in tls13_legacy_connect (ssl=0x73ee0c00) at 
/usr/src/lib/libssl/tls13_legacy.c:466
#8  0x0e87b026 in tls13_legacy_write_bytes (ssl=0x73ee0c00, type=23, 
vbuf=0x44c1f000, len=0)
    at /usr/src/lib/libssl/tls13_legacy.c:266
#9  0x0e85f6b8 in ssl3_write (s=0x73ee0c00, buf=0x44c1f000, len=0) at 
/usr/src/lib/libssl/s3_lib.c:2460
#10 0x17dcc03e in ?? ()
#11 0x17dc0e7d in ?? ()
#12 0x17da91f3 in ?? ()
#13 0x17da90fa in ?? ()

Reply via email to