From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: WIP Incremental JSON Parser |
Date: | 2024-03-25 23:24:08 |
Message-ID: | CAD5tBc+DRt9ArFC7CmG0xpmk6i8xbn5a6Hq1i-21VP8-yiQO_g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Mar 25, 2024 at 7:12 PM Jacob Champion <
jacob(dot)champion(at)enterprisedb(dot)com> wrote:
> On Mon, Mar 25, 2024 at 4:02 PM Andrew Dunstan <andrew(at)dunslane(dot)net>
> wrote:
> > Well, what's the alternative? The current parser doesn't check stack
> depth in frontend code. Presumably it too will eventually just run out of
> memory, possibly rather sooner as the stack frames could be more expensive
> than the incremental parser stack extensions.
>
> Stack size should be pretty limited, at least on the platforms I'm
> familiar with. So yeah, the recursive descent will segfault pretty
> quickly, but it won't repalloc() an unbounded amount of heap space.
> The alternative would just be to go back to a hardcoded limit in the
> short term, I think.
>
>
>
OK, so we invent a new error code and have the parser return that if the
stack depth gets too big?
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Jacob Champion | 2024-03-25 23:27:46 | Re: WIP Incremental JSON Parser |
Previous Message | Bruce Momjian | 2024-03-25 23:21:48 | Re: Regression tests fail with musl libc because libpq.so can't be loaded |