Re: jsonpath

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: jsonpath
Дата
Msg-id CAPpHfdue-pzzEVK+zoY6sbqG4LYC3JvW7-j8J78EqT-TOLdNiw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: jsonpath  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Ответы Re: jsonpath  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Mar 29, 2019 at 4:15 PM Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
>
> On Thu, Mar 28, 2019 at 7:43 PM Andrew Dunstan
> <andrew.dunstan@2ndquadrant.com> wrote:
> > On 3/28/19 9:50 AM, Tom Lane wrote:
> > > Andres Freund <andres@anarazel.de> writes:
> > >> On March 28, 2019 9:31:14 AM EDT, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > >>> Has anybody gotten through a valgrind run on this code yet?
> > >> Skink has successfully passed since - but that's x86...
> > > Yeah, there is a depressingly high chance that this is somehow specific
> > > to the bison version, flex version, and/or compiler in use on jacana.
> >
> > lousyjack has also passed it (x64).
> >
> > git bisect on jacana blames commit 550b9d26f.
>
> Hmm... 550b9d26f just makes jsonpath_gram.y and jsonpath_scan.l
> compile at once.  I've re-read this commit and didn't find anything
> suspicious.
> I've asked Andrew for access to jacana in order to investigate this myself.

Thanks to Andrew I got access to jacana and made some investigation.

At first, I found that existence of separate jsonpath_gram.h doesn't
influence the situation.  If have jsonpath_gram.h generated, test
still fails if compile jsonpath_gram.c and jsonpath_scan.c together.
But if build them separately, error is gone.

Then I did following trick: build jsonpath_gram.c and jsonpath_scan.c
separately, but copy contents of  jsonpath_gram.c to the top of
jsonpath_scan.c.  I also renamed yyparse to yyparse2 in the copy of
jsonpath_gram.c in order to make jsonpath_scan.c use another copy of
this function defined in the separate file.  Then test fails again.
After that, I found if I remove contents of yyparse2 function, then
test passes OK.  See versions of jsonpath_scan.c attached.

Thus, contents of unused function makes test fail or pass.  So far, it
looks like a compiler bug.  Any thoughts?

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Fix memleaks and error handling in jsonb_plpython
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: FETCH FIRST clause WITH TIES option