Hi,

On Wed, Jul 05, Lukas Tribus wrote:
> Am 05.07.2017 um 13:58 schrieb Emeric Brun:
> >
> >> Another bisect (this time with -dM or -DDEBUG_MEMORY), another commit...
> >> Now it points to 23e9e931 (MINOR: log: Add logurilen tunable).
> >>
> >>
> > Hi Lukas,
> >
> > Indeed this commit introduced a regression.
> >
> > The commit in attachment should fix the issue.
> >
> 
> Great, thank you.
> 
> I guess 23e9e931 also made matching a path unreliable, because with the
> crash fixed, the following configuration now works reliably:
> 
> use_backend robots if { path /robots.txt }

I also got a crash with a testconfig(no ssl). (Emeric's patch fixes this).

BTW compiling w/address sanitizer can also help. I got this crash report on OSX 
(-fsanitize=address -fno-omit-frame-pointer):
==22091==ERROR: AddressSanitizer: heap-buffer-overflow on address 
0x60200000e311 at pc 0x00010e940bbe bp 0x7fff519b2d90 sp 0x7fff519b2550
WRITE of size 27 at 0x60200000e311 thread T0
    #0 0x10e940bbd in __asan_memcpy (libclang_rt.asan_osx_dynamic.dylib+0x41bbd)
    #1 0x10e2d9d03 in http_wait_for_request proto_http.c:2964
    #2 0x10e36cdf7 in process_stream stream.c:1795
    #3 0x10e4ad864 in process_runnable_tasks task.c:238
    #4 0x10e4318ad in main haproxy.c:2168
    #5 0x7fff84d815ac in start (libdyld.dylib+0x35ac)

0x60200000e311 is located 0 bytes to the right of 1-byte region 
[0x60200000e310,0x60200000e311)
allocated by thread T0 here:
    #0 0x10e949bf0 in wrap_malloc (libclang_rt.asan_osx_dynamic.dylib+0x4abf0)
    #1 0x10e4a809a in pool_refill_alloc memory.c:117
    #2 0x10e2d9bd9 in http_wait_for_request memory.h:151
    #3 0x10e36cdf7 in process_stream stream.c:1795
    #4 0x10e4ad864 in process_runnable_tasks task.c:238
    #5 0x10e4318ad in main haproxy.c:2168
    #6 0x7fff84d815ac in start (libdyld.dylib+0x35ac)

-Jarno

-- 
Jarno Huuskonen

Reply via email to