Skip to content

Commit bb6c744

Browse files
committed
temp: backtrace memory-bio dtls12 segfault
1 parent 238f6e4 commit bb6c744

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

.github/workflows/diag.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,17 @@ jobs:
6060
grep -v 'would read block' /tmp/c.out | head -12
6161
exit $rc
6262
63-
- name: memory-bio-dtls -- is it DTLS1.3 specific?
63+
- name: memory-bio-dtls -- backtrace the dtls1.2 segfault
6464
if: always()
6565
run: |
6666
cd dtls
6767
export LD_LIBRARY_PATH=/tmp/inst/lib
68-
# A: as shipped -- picks DTLS 1.3 because the profile enables dtls13
69-
gcc -g -o /tmp/mb13 memory-bio-dtls.c -I/tmp/inst/include \
70-
-L/tmp/inst/lib -lwolfssl -lpthread -lm || exit 1
71-
# B: same source, forced onto DTLS 1.2 by hiding WOLFSSL_DTLS13
7268
sed 's/#ifdef WOLFSSL_DTLS13/#if 0/' memory-bio-dtls.c > /tmp/mb12.c
73-
gcc -g -o /tmp/mb12 /tmp/mb12.c -I/tmp/inst/include \
69+
gcc -g -O0 -o /tmp/mb12 /tmp/mb12.c -I/tmp/inst/include \
7470
-L/tmp/inst/lib -lwolfssl -lpthread -lm || exit 1
75-
for v in 13 12; do
76-
timeout 10 /tmp/mb$v > /tmp/o$v.txt 2>&1
77-
echo "=== DTLS 1.$v : rc=$? (0=works, 124=hangs)"
78-
grep -iE 'success|Version:|Cipher|client msg' /tmp/o$v.txt | head -5
79-
done
71+
ulimit -c unlimited
72+
echo "=== confirm the forced method:"
73+
grep -n -A4 '#if 0' /tmp/mb12.c | head -8
74+
echo "=== run under gdb:"
75+
gdb -batch -ex run -ex 'thread apply all bt' --args /tmp/mb12 2>&1 \
76+
| grep -vE '^\[|^Reading|^Downloading|^warning:' | tail -40

0 commit comments

Comments
 (0)