William,
Am 14.06.20 um 16:28 schrieb William Dauchy:
> After this patch, I'm getting a segfault after firing an USR1 signal
> to trigger the deinit:
>
> #0 0x000055b653aaec34 in release_sample_expr (expr=0x55b654766bc0) at
> src/sample.c:1427
> b1427 list_for_each_entry_safe(conv_expr, conv_exprb,
> &expr->conv_exprs, list)
> (gdb) bt
> #0 0x000055b653aaec34 in release_sample_expr (expr=0x55b654766bc0) at
> src/sample.c:1427
> #1 0x000055b653b0d884 in deinit_act_rules (rules=0x55b6547644b0) at
> src/haproxy.c:2559
> #2 0x000055b653b0f09d in deinit () at src/haproxy.c:2707
> #3 0x000055b653b0fef8 in deinit_and_exit (status=0) at src/haproxy.c:2872
> #4 0x000055b6539f7256 in main (argc=<optimized out>, argv=<optimized
> out>) at src/haproxy.c:3771
>
I can reproduce this with the following config:
frontend http
mode http
bind 127.0.0.1:80
http-request redirect scheme https if METH_GET
> $ valgrind ./haproxy -c -f ./crasher.cfg
> [...]
> ==6484== Invalid read of size 8
> ==6484== at 0x4C4747: release_sample_expr (sample.c:1427)
> ==6484== by 0x525A43: deinit_act_rules (haproxy.c:2558)
> ==6484== by 0x5271CA: deinit (haproxy.c:2706)
> ==6484== by 0x528017: deinit_and_exit (haproxy.c:2871)
> ==6484== by 0x528E90: init (haproxy.c:2205)
> ==6484== by 0x41F382: main (haproxy.c:3127)
> ==6484== Address 0x0 is not stack'd, malloc'd or (recently) free'd
I would assume that this is related to METH_GET being a default acl.
Best regards
Tim Düsterhus