Hello,
On Fri, 29 Jun 2018 at 07:15, Jarno Huuskonen <jarno.huusko...@uef.fi> wrote: > > Hi, > > On Thu, Jun 28, Jarno Huuskonen wrote: > > I think this is the commit that breaks map_regm in this case: > > b5997f740b21ebb197e10a0f2fe9dc13163e1772 (MAJOR: threads/map: Make > > acls/maps thread safe). > > > > If I revert this commit from pattern.c:pattern_exec_match > > then the map_regm \1 backref seems to work. > > I think I found what's replacing the \000 as first char: > in (map.c) sample_conv_map: > /* In the regm case, merge the sample with the input. */ > if ((long)private == PAT_MATCH_REGM) { > str = get_trash_chunk(); > str->len = exp_replace(str->str, str->size, > smp->data.u.str.str, > pat->data->u.str.str, > (regmatch_t *)smp->ctx.a[0]); > > Before call to get_trash_chunk() smp->data.u.str.str is for example > 'distri.com' and after get_trash_chunk() smp->data.u.str.str > is '\000istri.com'. > > At the moment I don't have time to dig deeper, but hopefully this > helps a little bit. Thanks for the detailed analysis, relaying to Emeric ... Lukas