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

Trying to decode a string containing 100,000 [ characters (and nothing else) crashes Python #1

Closed
AdamWill opened this issue Feb 10, 2017 · 5 comments

Comments

@AdamWill
Copy link

This is one of the tests from JSONTestSuite. It just throws a file containing 100,000 [ characters at the parser. When trying to parse this, python-cjson crashes Python. The backtrace is gigantic, and I haven't actually got to the end of it in gdb, but it starts like this:

Starting program: /usr/bin/python test.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7a7f46a in PyObject_Malloc (nbytes=72) at /usr/src/debug/Python-2.7.13/Objects/obmalloc.c:787
787	{

Thread 1 (Thread 0x7ffff7fc5700 (LWP 17767)):
#0  0x00007ffff7a7f46a in PyObject_Malloc (nbytes=72) at /usr/src/debug/Python-2.7.13/Objects/obmalloc.c:787
        bp = <optimized out>
        pool = <optimized out>
        next = <optimized out>
        size = <optimized out>
#1  0x00007ffff7b0cb1e in _PyObject_GC_Malloc (basicsize=<optimized out>)
    at /usr/src/debug/Python-2.7.13/Modules/gcmodule.c:1573
        op = <optimized out>
        g = <optimized out>
        basicsize = <optimized out>
#2  0x00007ffff7b0cc1d in _PyObject_GC_New (tp=tp@entry=0x7ffff7d8b540 <PyList_Type>)
    at /usr/src/debug/Python-2.7.13/Modules/gcmodule.c:1595
        op = <unknown at remote 0x-77912ed569a81900>
#3  0x00007ffff7a6c5fc in PyList_New (size=size@entry=0) at /usr/src/debug/Python-2.7.13/Objects/listobject.c:151
        op = <optimized out>
        nbytes = 0
#4  0x00007ffff68e56bd in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:339
        c = <optimized out>
        object = <optimized out>
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = <optimized out>
#5  decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#6  0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x555555821292 '[' <repeats 200 times>...
#7  decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#8  0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x555555821291 '[' <repeats 200 times>...
#9  decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#10 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x555555821290 '[' <repeats 200 times>...
#11 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#12 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555582128f '[' <repeats 200 times>...
#13 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#14 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555582128e '[' <repeats 200 times>...
#15 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#16 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555582128d '[' <repeats 200 times>...
#17 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#18 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555582128c '[' <repeats 200 times>...
#19 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#20 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555582128b '[' <repeats 200 times>...
#21 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#22 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555582128a '[' <repeats 200 times>...
#23 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#24 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x555555821289 '[' <repeats 200 times>...
#25 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#26 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x555555821288 '[' <repeats 200 times>...
#27 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#28 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x555555821287 '[' <repeats 200 times>...
#29 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#30 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x555555821286 '[' <repeats 200 times>...
#31 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#32 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x555555821285 '[' <repeats 200 times>...
#33 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#34 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x555555821284 '[' <repeats 200 times>...
#35 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#36 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x555555821283 '[' <repeats 200 times>...
#37 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#38 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x555555821282 '[' <repeats 200 times>...
#39 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#40 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x555555821281 '[' <repeats 200 times>...
#41 decode_json (jsondata=jsondata@entry=0x7fffffffdaa0) at cjson.c:532
No locals.
#42 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffdaa0) at cjson.c:369
        c = <optimized out>

It then repeats that, over and over and over again; I suspect there are going to be 100,000 of 'em before we get to the end.

@AdamWill
Copy link
Author

Here's the end of the backtrace:

[adamw@adam JSONTestSuite (python-cjson %)]$ tail -200 bt.txt
No locals.
#149676 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffda90) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555580ee3f '[' <repeats 200 times>...
#149677 decode_json (jsondata=jsondata@entry=0x7fffffffda90) at cjson.c:532
No locals.
#149678 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffda90) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555580ee3e '[' <repeats 200 times>...
#149679 decode_json (jsondata=jsondata@entry=0x7fffffffda90) at cjson.c:532
No locals.
#149680 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffda90) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555580ee3d '[' <repeats 200 times>...
#149681 decode_json (jsondata=jsondata@entry=0x7fffffffda90) at cjson.c:532
No locals.
#149682 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffda90) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555580ee3c '[' <repeats 200 times>...
#149683 decode_json (jsondata=jsondata@entry=0x7fffffffda90) at cjson.c:532
No locals.
#149684 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffda90) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555580ee3b '[' <repeats 200 times>...
#149685 decode_json (jsondata=jsondata@entry=0x7fffffffda90) at cjson.c:532
No locals.
#149686 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffda90) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555580ee3a '[' <repeats 200 times>...
#149687 decode_json (jsondata=jsondata@entry=0x7fffffffda90) at cjson.c:532
No locals.
#149688 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffda90) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555580ee39 '[' <repeats 200 times>...
#149689 decode_json (jsondata=jsondata@entry=0x7fffffffda90) at cjson.c:532
No locals.
#149690 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffda90) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555580ee38 '[' <repeats 200 times>...
#149691 decode_json (jsondata=jsondata@entry=0x7fffffffda90) at cjson.c:532
No locals.
#149692 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffda90) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555580ee37 '[' <repeats 200 times>...
#149693 decode_json (jsondata=jsondata@entry=0x7fffffffda90) at cjson.c:532
No locals.
#149694 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffda90) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555580ee36 '[' <repeats 200 times>...
#149695 decode_json (jsondata=jsondata@entry=0x7fffffffda90) at cjson.c:532
No locals.
#149696 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffda90) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555580ee35 '[' <repeats 200 times>...
#149697 decode_json (jsondata=jsondata@entry=0x7fffffffda90) at cjson.c:532
No locals.
#149698 0x00007ffff68e5748 in decode_array (jsondata=0x7fffffffda90) at cjson.c:369
        c = <optimized out>
        object = []
        item = <optimized out>
        next_state = <optimized out>
        result = <optimized out>
        start = 0x55555580ee34 '[' <repeats 200 times>...
#149699 decode_json (jsondata=jsondata@entry=0x7fffffffda90) at cjson.c:532
No locals.
#149700 0x00007ffff68e5e02 in JSON_decode (self=<optimized out>, args=<optimized out>, kwargs=<optimized out>) at cjson.c:1141
        kwlist = {0x7ffff68e60a0 "json", 0x7ffff68e60e7 "all_unicode", 0x0}
        all_unicode = 0
        object = <optimized out>
        string = '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[['
        str = '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[['
        jsondata = {str = 0x55555580ee34 '[' <repeats 200 times>..., end = 0x5555558274d4 "", ptr = 0x555555821293 '[' <repeats 200 times>..., all_unicode = 0}
#149701 0x00007ffff7ada127 in call_function (oparg=<optimized out>, pp_stack=0x7fffffffdb90) at /usr/src/debug/Python-2.7.13/Python/ceval.c:4429
        flags = <optimized out>
        tstate = 0x5555557560a0
        func = <optimized out>
        w = <optimized out>
        na = 1
        nk = 0
        n = 1
        pfunc = 0x7ffff7eb8c78
        x = <optimized out>
#149702 PyEval_EvalFrameEx (f=f@entry=Frame 0x7ffff7eb8b00, for file test.py, line 4, in <module> (), throwflag=throwflag@entry=0) at /usr/src/debug/Python-2.7.13/Python/ceval.c:3063
        sp = 0x7ffff7eb8c80
        opcode_targets = {0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7adbd3a <PyEval_EvalFrameEx+31658>, 0x7ffff7adbd3f <PyEval_EvalFrameEx+31663>, 0x7ffff7adbd44 <PyEval_EvalFrameEx+31668>, 0x7ffff7adbd4e <PyEval_EvalFrameEx+31678>, 0x7ffff7adbd49 <PyEval_EvalFrameEx+31673>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7adbcdf <PyEval_EvalFrameEx+31567>, 0x7ffff7adbd72 <PyEval_EvalFrameEx+31714>, 0x7ffff7adbd77 <PyEval_EvalFrameEx+31719>, 0x7ffff7adbd7c <PyEval_EvalFrameEx+31724>, 0x7ffff7adbd81 <PyEval_EvalFrameEx+31729>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7adbd86 <PyEval_EvalFrameEx+31734>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7adbd8b <PyEval_EvalFrameEx+31739>, 0x7ffff7adbd90 <PyEval_EvalFrameEx+31744>, 0x7ffff7adbd95 <PyEval_EvalFrameEx+31749>, 0x7ffff7adbda4 <PyEval_EvalFrameEx+31764>, 0x7ffff7adbda9 <PyEval_EvalFrameEx+31769>, 0x7ffff7adbdae <PyEval_EvalFrameEx+31774>, 0x7ffff7adbdb3 <PyEval_EvalFrameEx+31779>, 0x7ffff7adbd9f <PyEval_EvalFrameEx+31759>, 0x7ffff7adbd9a <PyEval_EvalFrameEx+31754>, 0x7ffff7adbe1d <PyEval_EvalFrameEx+31885>, 0x7ffff7adbe18 <PyEval_EvalFrameEx+31880>, 0x7ffff7adbe4a <PyEval_EvalFrameEx+31930>, 0x7ffff7adbe5a <PyEval_EvalFrameEx+31946>, 0x7ffff7adbe67 <PyEval_EvalFrameEx+31959>, 0x7ffff7adbe74 <PyEval_EvalFrameEx+31972>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7adbe84 <PyEval_EvalFrameEx+31988>, 0x7ffff7adbe97 <PyEval_EvalFrameEx+32007>, 0x7ffff7ad9c69 <PyEval_EvalFrameEx+23257>, 0x7ffff7adbea7 <PyEval_EvalFrameEx+32023>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad9656 <PyEval_EvalFrameEx+21702>, 0x7ffff7adbeb7 <PyEval_EvalFrameEx+32039>, 0x7ffff7ad96a4 <PyEval_EvalFrameEx+21780>, 0x7ffff7adbec7 <PyEval_EvalFrameEx+32055>, 0x7ffff7ada198 <PyEval_EvalFrameEx+24584>, 0x7ffff7adbe27 <PyEval_EvalFrameEx+31895>, 0x7ffff7adbe2c <PyEval_EvalFrameEx+31900>, 0x7ffff7adbe0e <PyEval_EvalFrameEx+31870>, 0x7ffff7adbe13 <PyEval_EvalFrameEx+31875>, 0x7ffff7adbe22 <PyEval_EvalFrameEx+31890>, 0x7ffff7adbed7 <PyEval_EvalFrameEx+32071>, 0x7ffff7adbedc <PyEval_EvalFrameEx+32076>, 0x7ffff7adbdb8 <PyEval_EvalFrameEx+31784>, 0x7ffff7adbdbd <PyEval_EvalFrameEx+31789>, 0x7ffff7adbdc2 <PyEval_EvalFrameEx+31794>, 0x7ffff7adbdc7 <PyEval_EvalFrameEx+31799>, 0x7ffff7adbdcc <PyEval_EvalFrameEx+31804>, 0x7ffff7adbe09 <PyEval_EvalFrameEx+31865>, 0x7ffff7ada2b2 <PyEval_EvalFrameEx+24866>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7adbee1 <PyEval_EvalFrameEx+32081>, 0x7ffff7ad4cfe <PyEval_EvalFrameEx+2926>, 0x7ffff7ad8a76 <PyEval_EvalFrameEx+18662>, 0x7ffff7ad4cec <PyEval_EvalFrameEx+2908>, 0x7ffff7ad8a64 <PyEval_EvalFrameEx+18644>, 0x7ffff7adbe31 <PyEval_EvalFrameEx+31905>, 0x7ffff7adbe36 <PyEval_EvalFrameEx+31910>, 0x7ffff7adbe3b <PyEval_EvalFrameEx+31915>, 0x7ffff7adbe40 <PyEval_EvalFrameEx+31920>, 0x7ffff7adbe45 <PyEval_EvalFrameEx+31925>, 0x7ffff7ad8d57 <PyEval_EvalFrameEx+19399>, 0x7ffff7ada367 <PyEval_EvalFrameEx+25047>, 0x7ffff7adb0be <PyEval_EvalFrameEx+28462>, 0x7ffff7ad79da <PyEval_EvalFrameEx+14410>, 0x7ffff7ada20e <PyEval_EvalFrameEx+24702>, 0x7ffff7adba32 <PyEval_EvalFrameEx+30882>, 0x7ffff7ad7d77 <PyEval_EvalFrameEx+15335>, 0x7ffff7adba37 <PyEval_EvalFrameEx+30887>, 0x7ffff7adbad1 <PyEval_EvalFrameEx+31041>, 0x7ffff7adbad9 <PyEval_EvalFrameEx+31049>, 0x7ffff7adbae3 <PyEval_EvalFrameEx+31059>, 0x7ffff7adbb00 <PyEval_EvalFrameEx+31088>, 0x7ffff7adbb1a <PyEval_EvalFrameEx+31114>, 0x7ffff7ada2b7 <PyEval_EvalFrameEx+24871>, 0x7ffff7adbdd1 <PyEval_EvalFrameEx+31809>, 0x7ffff7adbb36 <PyEval_EvalFrameEx+31142>, 0x7ffff7adbb4f <PyEval_EvalFrameEx+31167>, 0x7ffff7adbb6b <PyEval_EvalFrameEx+31195>, 0x7ffff7adbb87 <PyEval_EvalFrameEx+31223>, 0x7ffff7adbd56 <PyEval_EvalFrameEx+31686>, 0x7ffff7adbd01 <PyEval_EvalFrameEx+31601>, 0x7ffff7adbba0 <PyEval_EvalFrameEx+31248>, 0x7ffff7adbc46 <PyEval_EvalFrameEx+31414>, 0x7ffff7ada147 <PyEval_EvalFrameEx+24503>, 0x7ffff7ada161 <PyEval_EvalFrameEx+24529>, 0x7ffff7ada17b <PyEval_EvalFrameEx+24555>, 0x7ffff7ada1b6 <PyEval_EvalFrameEx+24614>, 0x7ffff7ada1d0 <PyEval_EvalFrameEx+24640>, 0x7ffff7ada1ef <PyEval_EvalFrameEx+24671>, 0x7ffff7ada213 <PyEval_EvalFrameEx+24707>, 0x7ffff7ada230 <PyEval_EvalFrameEx+24736>, 0x7ffff7ada280 <PyEval_EvalFrameEx+24816>, 0x7ffff7ada299 <PyEval_EvalFrameEx+24841>, 0x7ffff7ad62e2 <PyEval_EvalFrameEx+8530>, 0x7ffff7ada248 <PyEval_EvalFrameEx+24760>, 0x7ffff7ada264 <PyEval_EvalFrameEx+24788>, 0x7ffff7adbbbe <PyEval_EvalFrameEx+31278>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ada2d4 <PyEval_EvalFrameEx+24900>, 0x7ffff7ada2f0 <PyEval_EvalFrameEx+24928>, 0x7ffff7ada30f <PyEval_EvalFrameEx+24959>, 0x7ffff7ada32e <PyEval_EvalFrameEx+24990>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7adbce4 <PyEval_EvalFrameEx+31572>, 0x7ffff7adbd1e <PyEval_EvalFrameEx+31630>, 0x7ffff7adbbd8 <PyEval_EvalFrameEx+31304>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7adb0a0 <PyEval_EvalFrameEx+28432>, 0x7ffff7ad6b72 <PyEval_EvalFrameEx+10722>, 0x7ffff7ada411 <PyEval_EvalFrameEx+25217>, 0x7ffff7ada44b <PyEval_EvalFrameEx+25275>, 0x7ffff7ada42e <PyEval_EvalFrameEx+25246>, 0x7ffff7adbbf2 <PyEval_EvalFrameEx+31330>, 0x7ffff7adbc0f <PyEval_EvalFrameEx+31359>, 0x7ffff7adbc29 <PyEval_EvalFrameEx+31385>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ada36f <PyEval_EvalFrameEx+25055>, 0x7ffff7ada3a7 <PyEval_EvalFrameEx+25111>, 0x7ffff7ada3ed <PyEval_EvalFrameEx+25181>, 0x7ffff7ada34d <PyEval_EvalFrameEx+25021>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297>, 0x7ffff7ad6f02 <PyEval_EvalFrameEx+11634>, 0x7ffff7adbded <PyEval_EvalFrameEx+31837>, 0x7ffff7ada19d <PyEval_EvalFrameEx+24589>, 0x7ffff7ad4e71 <PyEval_EvalFrameEx+3297> <repeats 108 times>}
        stack_pointer = <optimized out>
        next_instr = <optimized out>
        opcode = 131
        oparg = <optimized out>
        why = WHY_NOT
        err = 0
        x = <optimized out>
        v = <optimized out>
        w = <optimized out>
        u = <optimized out>
        t = <optimized out>
        stream = 0x0
        fastlocals = 0x7ffff7eb8c78
        freevars = <optimized out>
        retval = <optimized out>
        tstate = <optimized out>
        co = <optimized out>
        instr_ub = <optimized out>
        instr_lb = <optimized out>
        instr_prev = <optimized out>
        first_instr = <optimized out>
        names = <optimized out>
        consts = <optimized out>
#149703 0x00007ffff7addabc in PyEval_EvalCodeEx (co=co@entry=0x7ffff7e6c2b0, globals=globals@entry={'__builtins__': <module at remote 0x7ffff7f85b08>, '__file__': 'test.py', '__package__': None, 'cjson': <module at remote 0x7ffff7e7ee50>, 'fh': <file at remote 0x7ffff7ec26f0>, '__name__': '__main__', 'data': '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...(truncated), locals=locals@entry={'__builtins__': <module at remote 0x7ffff7f85b08>, '__file__': 'test.py', '__package__': None, 'cjson': <module at remote 0x7ffff7e7ee50>, 'fh': <file at remote 0x7ffff7ec26f0>, '__name__': '__main__', 'data': '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...(truncated), args=args@entry=0x0, argcount=argcount@entry=0, kws=kws@entry=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at /usr/src/debug/Python-2.7.13/Python/ceval.c:3661
        f = Frame 0x7ffff7eb8b00, for file test.py, line 4, in <module> ()
        retval = 0x0
        fastlocals = 0x7ffff7eb8c78
        freevars = 0x7ffff7eb8c78
        tstate = 0x5555557560a0
        x = <optimized out>
        u = <optimized out>
#149704 0x00007ffff7addba9 in PyEval_EvalCode (co=co@entry=0x7ffff7e6c2b0, globals=globals@entry={'__builtins__': <module at remote 0x7ffff7f85b08>, '__file__': 'test.py', '__package__': None, 'cjson': <module at remote 0x7ffff7e7ee50>, 'fh': <file at remote 0x7ffff7ec26f0>, '__name__': '__main__', 'data': '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...(truncated), locals=locals@entry={'__builtins__': <module at remote 0x7ffff7f85b08>, '__file__': 'test.py', '__package__': None, 'cjson': <module at remote 0x7ffff7e7ee50>, 'fh': <file at remote 0x7ffff7ec26f0>, '__name__': '__main__', 'data': '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...(truncated)) at /usr/src/debug/Python-2.7.13/Python/ceval.c:691
No locals.
#149705 0x00007ffff7af703f in run_mod (mod=<optimized out>, filename=filename@entry=0x7fffffffe33a "test.py", globals=globals@entry={'__builtins__': <module at remote 0x7ffff7f85b08>, '__file__': 'test.py', '__package__': None, 'cjson': <module at remote 0x7ffff7e7ee50>, 'fh': <file at remote 0x7ffff7ec26f0>, '__name__': '__main__', 'data': '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...(truncated), locals=locals@entry={'__builtins__': <module at remote 0x7ffff7f85b08>, '__file__': 'test.py', '__package__': None, 'cjson': <module at remote 0x7ffff7e7ee50>, 'fh': <file at remote 0x7ffff7ec26f0>, '__name__': '__main__', 'data': '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...(truncated), flags=flags@entry=0x7fffffffde20, arena=arena@entry=0x5555557c33b0) at /usr/src/debug/Python-2.7.13/Python/pythonrun.c:1384
        co = 0x7ffff7e6c2b0
        v = <optimized out>
#149706 0x00007ffff7af8272 in PyRun_FileExFlags (fp=fp@entry=0x5555557d6220, filename=filename@entry=0x7fffffffe33a "test.py", start=start@entry=257, globals=globals@entry={'__builtins__': <module at remote 0x7ffff7f85b08>, '__file__': 'test.py', '__package__': None, 'cjson': <module at remote 0x7ffff7e7ee50>, 'fh': <file at remote 0x7ffff7ec26f0>, '__name__': '__main__', 'data': '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...(truncated), locals=locals@entry={'__builtins__': <module at remote 0x7ffff7f85b08>, '__file__': 'test.py', '__package__': None, 'cjson': <module at remote 0x7ffff7e7ee50>, 'fh': <file at remote 0x7ffff7ec26f0>, '__name__': '__main__', 'data': '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...(truncated), closeit=closeit@entry=1, flags=0x7fffffffde20) at /usr/src/debug/Python-2.7.13/Python/pythonrun.c:1370
        ret = <optimized out>
        mod = <optimized out>
        arena = 0x5555557c33b0
#149707 0x00007ffff7af9485 in PyRun_SimpleFileExFlags (fp=fp@entry=0x5555557d6220, filename=0x7fffffffe33a "test.py", closeit=closeit@entry=1, flags=flags@entry=0x7fffffffde20) at /usr/src/debug/Python-2.7.13/Python/pythonrun.c:956
        m = <module at remote 0x7ffff7f46c58>
        d = {'__builtins__': <module at remote 0x7ffff7f85b08>, '__file__': 'test.py', '__package__': None, 'cjson': <module at remote 0x7ffff7e7ee50>, 'fh': <file at remote 0x7ffff7ec26f0>, '__name__': '__main__', 'data': '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...(truncated)
        v = <optimized out>
        ext = <optimized out>
        set_file_name = 1
        len = <optimized out>
        ret = -1
#149708 0x00007ffff7af9993 in PyRun_AnyFileExFlags (fp=fp@entry=0x5555557d6220, filename=<optimized out>, closeit=closeit@entry=1, flags=flags@entry=0x7fffffffde20) at /usr/src/debug/Python-2.7.13/Python/pythonrun.c:760
No locals.
#149709 0x00007ffff7b0b450 in Py_Main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/Python-2.7.13/Modules/main.c:640
        c = <optimized out>
        sts = <optimized out>
        command = 0x0
        filename = 0x7fffffffe33a "test.py"
        module = 0x0
        fp = 0x5555557d6220
        p = <optimized out>
        unbuffered = <optimized out>
        skipfirstline = 0
        stdin_is_interactive = 1
        help = <optimized out>
        version = <optimized out>
        saw_unbuffered_flag = <optimized out>
        cf = {cf_flags = 0}
#149710 0x00007ffff6d0d671 in __libc_start_main (main=0x555555554780 <main>, argc=2, argv=0x7fffffffdfe8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdfd8) at ../csu/libc-start.c:295
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, 1328310739990587079, 93824992233360, 140737488347104, 0, 0, 5132501319396468423, 5132516566225364679}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x7fffffffe000, 0x7ffff7ffe330}, data = {prev = 0x0, cleanup = 0x0, canceltype = -8192}}}
        not_first_call = <optimized out>
#149711 0x00005555555547ba in _start ()
No symbol table info available.

@AdamWill
Copy link
Author

Note: this may be considered a security issue, but I didn't think delaying disclosure made any sense, since the JSONTestSuite tests are public and have been for months, and were discussed in the press more than once.

@AdamWill
Copy link
Author

AdamWill added a commit to AdamWill/python-cjson that referenced this issue Feb 10, 2017
This implements a maximum recursion depth when parsing arrays
and objects, to prevent the potential to crash the parser by
asking it to parse something with a huge amount of recursion.

The issue was discovered using Nicolas Seriot's JSONTestSuite:
https://github.com/nst/JSONTestSuite

The fix is directly inspired by the similar protection in
ultrajson / ujson:
https://github.com/esnme/ultrajson

Signed-off-by: Adam Williamson <[email protected]>
@AdamWill
Copy link
Author

#3 fixes this, I tested it.

@danpascu
Copy link
Contributor

Hi Adam, the issue is fixed in version 1.2.0. Thanks for tracking this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants