follow up

2018-07-09 Thread Anna Kucirkova
Hey there

In case you missed my last email I just wanted to give you another shout. If I 
don't hear back from you I won't bug you again. However, if you ever have any 
other questions, please contact me anytime.

Thank you,

Anna.

On Tue, Jul 3, 2018 at 9:23 PM, Anna Kucirkova 
 wrote:

Hello there,

Your page http://feedjunkie.com/feed/242/10 has some good references to 

depression and suicide so I wanted to get in touch with you. I've recently 
written an article about

HOW TO HELP THOSE CONSIDERING SUICIDE and was wondering if you thought my 
article could be a good addition to your page.

You can read my article right here: 

https://careersinpsychology.org/how-help-those-considering-suicide/

I would like to hear your opinion on this article.  Also, if you find it 
useful, please consider linking to it from your page I mentioned earlier. If 
you prefer you may republish the article. Let me know what you think.

Thank you very much,

Anna.



Re: Bug when passing variable to mapping function

2018-07-09 Thread Daniel Schneller
Hi!

Thanks for your analysis. I was away for a few days, hence the late
response.

> AFAIK this works on 1.7.11 but seems to be broken on all 1.8.x.

Interesting. I tried the new config locally with 1.8 and found the bug.
Production servers are still on 1.7, so it would even have worked :)
I am glad, though, that I found this on 1.8, sparing me the trouble some
time down the road when they get updated.


> > 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'.

I had a look at that code, but I must admit my understanding of the
concepts (trash chunk? some optimization, I assume?) and C as a language is
too limited to make a patch myself.
Is this on any of the developers' radar?

Thanks a lot :)

Daniel

On 29 June 2018 at 07:14, Jarno Huuskonen  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.
>
> -Jarno
>
> --
> Jarno Huuskonen
>
>


-- 

-- 
Daniel Schneller
Principal Cloud Engineer

CenterDevice GmbH  | Hochstraße 11
   | 42697 Solingen
tel: +49 1754155711| Deutschland
daniel.schnel...@centerdevice.de   | www.centerdevice.de

Geschäftsführung: Dr. Patrick Peschlow, Dr. Lukas Pustina,
Michael Rosbach, Handelsregister-Nr.: HRB 18655,
HR-Gericht: Bonn, USt-IdNr.: DE-815299431