Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing deep JSON fails with vimscript implementation #153

Closed
dbarnett opened this issue Jul 19, 2015 · 0 comments
Closed

Parsing deep JSON fails with vimscript implementation #153

dbarnett opened this issue Jul 19, 2015 · 0 comments
Assignees
Labels

Comments

@dbarnett
Copy link
Contributor

Since we use a recursive descent parser for the vimscript implementation of maktaba#json#Parse without setting 'maxfuncdepth', we're subject to vim's default recursion depth and can only parse up to a depth of ~&maxfuncdepth/2.

:echo maktaba#json#Parse('[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]')
Error detected while processing function maktaba#json#Parse..<SNR>110_ParsePartial..
(snip)<SNR>110_ParseListPartial..<SNR>110_Consume..maktaba#string#StripLeading..maktaba#ensure#IsString:
line    1:
E132: Function call depth is higher than 'maxfuncdepth'

We should bump 'maxfuncdepth' up to some very high number in maktaba#json#Parse and maktaba#json#Format and restore it after our recursion completes.

@dbarnett dbarnett added the bug label Jul 19, 2015
@dbarnett dbarnett self-assigned this Apr 29, 2017
dbarnett added a commit that referenced this issue May 8, 2017
Changes since 1.14.0:
  * Implement maktaba#buffer#GetVisualSelection helper (#132).
  * Implement maktaba#log#GetFormattedEntries and support 1-arg log
    handler (see #204).
  * Notify user for messages logged at WARN or above by default (#185).
  * Fix Syscall.CallAsync failing for complex commands (#205).
  * Preserve trailing slash in maktaba#path#Split and MakeRelative
    (#137 and #175).
  * Fix 'maxfuncdepth' error in maktaba#json#Parse corner case (#153).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant