This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Michael.Felt
Recipients David.Edelsohn, Michael.Felt, pablogsal, skrah
Date 2020-07-05.13:40:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1593956404.71.0.055479495148.issue41215@roundup.psfhosted.org>
In-reply-to
Content
Well, the first step -s just showing where the segmentation fault occurs (in pegen.c).

I am not really 'wiser' in what I should be looking at. I'll try adding a fprintf(stderr, ....) to see if I can figure out a bit more.

For the experts:

(dbx) where
strncmp(??, ??, ??) at 0xd011d920
_get_keyword_or_name_type(p = 0x00000023, name = warning: Unable to access address 0xd from core
(invalid char ptr (0x0000000d)), name_len = 0), line 503 in "pegen.c"
_PyPegen_fill_token(p = 0x1025f138), line 546 in "pegen.c"
_PyPegen_expect_token(p = (nil), type = 805759776), line 675 in "pegen.c"
_tmp_6_rule@AF486_140(??), line 10251 in "parse.c"
_PyPegen_lookahead(positive = 269294544, func = 0x3001da40, p = 0x2ff20f30), line 666 in "pegen.c"
compound_stmt_rule@AF476_280(??), line 1232 in "parse.c"
statement_rule@AF477_284(??), line 795 in "parse.c"
unnamed block in _loop1_2_rule(p = 0x30085830), line 10086 in "parse.c"
_loop1_2_rule(p = 0x30085830), line 10086 in "parse.c"
statements_rule@AF478_285(??), line 766 in "parse.c"
file_rule@AF479_289(??), line 646 in "parse.c"
_PyPegen_run_parser(p = 0x30085820), line 916 in "pegen.c"
_PyPegen_run_parser_from_string(str = "compile", start_rule = 272032944, filename_ob = 0x20084f68, iflags = 805427776, arena = 0x30085820), line 1024 in "pegen.c"
PyPegen_ASTFromStringObject(str = (nil), filename = (nil), mode = 804393472, flags = 0x20035cb0, arena = 0x102453c4), line 26 in "peg_api.c"
unnamed block in Py_CompileStringObject(str = "|p^[yN", filename = (nil), start = 0, flags = 0x3007bbc8, optimize = -2147483647), line 1244 in "pythonrun.c"
Py_CompileStringObject(str = "|p^[yN", filename = (nil), start = 0, flags = 0x3007bbc8, optimize = -2147483647), line 1244 in "pythonrun.c"
builtin_compile_impl(module = (nil), source = 0x20000bd8, filename = 0x20063c48, mode = "\320Qf", flags = 1, dont_inherit = 536873648, optimize = 804393760, feature_version = 537275800), line 823 in "bltinmodule.c"
builtin_compile(module = 0x2ff21460, args = 0x3007fa78, nargs = 2, kwnames = 0x30007470), line 274 in "bltinmodule.c.h"
cfunction_vectorcall_FASTCALL_KEYWORDS(func = 0x100b203c, args = 0x00000003, nargsf = 804394000, kwnames = 0x20047844), line 396 in "methodobject.c"
PyVectorcall_Call(callable = 0x100b2e10, tuple = 0x20026f40, kwargs = 0x2ff21470), line 255 in "call.c"
_PyObject_Call(tstate = 0x100b1d1c, callable = 0x30002870, args = 0x2ff214c0, kwargs = 0x30043fd0), line 265 in "call.c"
do_call_core(tstate = 0x00000001, func = 0x30094050, callargs = 0x30046428, kwdict = 0x300462e8), line 5054 in "ceval.c"
_PyEval_EvalFrameDefault(tstate = 0x3009315c, f = 0x30043e58, throwflag = -261800280), line 3542 in "ceval.c"
_PyEval_EvalCode(tstate = 0x3005d820, _co = 0x3003a6a0, globals = 0x2ff216d0, locals = 0x422822cc, args = 0x100b46e4, argcount = 805410760, kwnames = 0x2ff216d0, kwargs = 0x20047844, kwcount = 2, kwstep = 1, defs = (nil), defcount = 0, kwdefs = (nil), closure = (nil), name = 0x300197c8, qualname = 0x300197c8), line 41 in "pycore_ceval.h"
_PyFunction_Vectorcall(func = 0x100d3714, stack = 0x3008ea08, nargsf = 804394848, kwnames = 0x20047844), line 411 in "call.c"
_PyEval_EvalFrameDefault(tstate = 0xffffffff, f = 0x300834c8, throwflag = 804395040), line 487 in "abstract.h"
_PyEval_EvalCode(tstate = 0x300865b0, _co = 0x30061b88, globals = 0x2ff218e0, locals = 0x5328333f, args = 0x10073d54, argcount = 537279560, kwnames = 0x2ff218e0, kwargs = 0x20047844, kwcount = 0, kwstep = 1, defs = (nil), defcount = 0, kwdefs = 0x3006bb90, closure = (nil), name = 0x30061b88, qualname = 0x3004eb10), line 41 in "pycore_ceval.h"
_PyFunction_Vectorcall(func = 0x30092f50, stack = 0x30004048, nargsf = 804395376, kwnames = (nil)), line 411 in "call.c"
_PyEval_EvalFrameDefault(tstate = 0x100759a4, f = (nil), throwflag = 804395568), line 487 in "abstract.h"
function_code_fastcall(tstate = 0x300418bc, co = (nil), args = 0x3000c220, nargs = 805664616, globals = (nil)), line 41 in "pycore_ceval.h"
_PyEval_EvalFrameDefault(tstate = 0x100759a4, f = 0x30087c08, throwflag = 804395904), line 487 in "abstract.h"
function_code_fastcall(tstate = 0x30086520, co = 0x3004c070, args = 0x2000abe8, nargs = 1, globals = 0x30049ec0), line 41 in "pycore_ceval.h"
_PyEval_EvalFrameDefault(tstate = (nil), f = 0x00000001, throwflag = 804396240), line 487 in "abstract.h"
function_code_fastcall(tstate = 0x3004389c, co = 0x30031176, args = 0x30031160, nargs = 805626736, globals = (nil)), line 41 in "pycore_ceval.h"
_PyEval_EvalFrameDefault(tstate = 0x100759a4, f = 0x20063c48, throwflag = 804396576), line 487 in "abstract.h"
function_code_fastcall(tstate = 0x00000082, co = 0x00000087, args = 0x2ff21e90, nargs = 0, globals = 0x3004c070), line 41 in "pycore_ceval.h"
_PyEval_EvalFrameDefault(tstate = 0x102f4474, f = (nil), throwflag = 804397104), line 487 in "abstract.h"
function_code_fastcall(tstate = 0x3004ca50, co = 0x3004c688, args = 0x2ff21ff0, nargs = 537163844, globals = 0x10073e78), line 41 in "pycore_ceval.h"
object_vacall(tstate = 0x20062d98, base = 0x20063c48, callable = 0x2ff22050, vargs = warning: Unable to access address 0x482822cf from core
(invalid char ptr (0x482822cf))), line 62 in "abstract.h"
_PyObject_CallMethodIdObjArgs(obj = (nil), name = 0x20025dc0, ... = 0x3008d778, 0x3003c488, 0x0, 0x3003ad88, 0x3003acc8, 0x3003ace8), line 895 in "call.c"
import_find_and_load(tstate = 0x2004185c, abs_name = (nil)), line 1767 in "import.c"
unnamed block in PyImport_ImportModuleLevelObject(name = 0x30084d70, globals = (nil), locals = 0x103b2490, fromlist = 0x2003acc8, level = 804397488), line 1881 in "import.c"
PyImport_ImportModuleLevelObject(name = 0x30084d70, globals = (nil), locals = 0x103b2490, fromlist = 0x2003acc8, level = 804397488), line 1881 in "import.c"
builtin___import__(self = 0x100bde94, args = 0x00000010, kwds = 0x2ff22220), line 280 in "bltinmodule.c"
cfunction_call(func = 0x20063c48, args = 0x3003c3e8, kwargs = (nil)), line 464 in "methodobject.c"
_PyObject_MakeTpCall(tstate = (nil), callable = 0x2ff2235c, args = 0x2ff22300, nargs = 673718991, keywords = 0x100bbd94), line 191 in "call.c"
_PyObject_CallFunctionVa(tstate = 0x61f122d6, callable = (nil), format = warning: Unable to access address 0xdeadbeef from core
(invalid char ptr (0xdeadbeef)), va = (nil), is_size_t = 0), line 65596 in "abstract.h"
PyObject_CallFunction(callable = 0x3003c488, format = "OOOOi", ... = 0x3008d778, 0x30084dc0, 0x30084dc0, 0x3006af48, 0x0, 0x0), line 577 in "call.c"
PyImport_Import(module_name = 0x2ff22540), line 2082 in "import.c"
PyImport_ImportModule(name = "\200A"), line 1485 in "import.c"
PyImport_ImportModuleNoBlock(name = "`"), line 1503 in "import.c"
_PyCodecRegistry_Init(), line 1541 in "codecs.c"
_PyCodec_Forget(encoding = warning: Unable to access address 0x61f122d6 from core
(invalid char ptr (0x61f122d6))), line 122 in "codecs.c"
init_stdio_encoding(tstate = 0x2ff22614), line 15915 in "unicodeobject.c"
init_fs_encoding(tstate = 0x20007e20), line 16028 in "unicodeobject.c"
_PyUnicode_InitEncodings(tstate = 0x2ff22730), line 16044 in "unicodeobject.c"
init_interp_main(tstate = 0x00000001), line 1006 in "pylifecycle.c"
pyinit_main(tstate = 0x200009f0), line 1097 in "pylifecycle.c"
Py_InitializeFromConfig(config = (nil)), line 1141 in "pylifecycle.c"
pymain_init(args = 0xf066a338), line 66 in "main.c"
pymain_main(args = 0x00000001), line 653 in "main.c"
Py_BytesMain(argc = -559038737, argv = 0xdeadbeef), line 686 in "main.c"
python.main(argc = 0, argv = (nil)), line 15 in "python.c"
(dbx)

(dbx) registers
  $r0:0xd011d900  $stkp:0x2ff20d40   $toc:0xf0648838    $r3:0x3fefffff
  $r4:0x200898bf    $r5:0x00000008    $r6:0x2000f098    $r7:0x00000012
  $r8:0x00556367    $r9:0x0a5f696d   $r10:0x80000000   $r11:0x7f7f7f7f
 $r12:0xf0641f5c   $r13:0x80000000   $r14:0x00000001   $r15:0x3004713c
 $r16:0x30047130   $r17:0x3003c668   $r18:0x20038844   $r19:0x30094078
 $r20:0x3007bbc8   $r21:0x3004642c   $r22:0x30046428   $r23:0x00000000
 $r24:0x20087710   $r25:0x00000012   $r26:0x00000001   $r27:0x00000005
 $r28:0x300a9980   $r29:0x2000f528   $r30:0x00000000   $r31:0x00000008
 $iar:0xd011d920   $msr:0x0000d032    $cr:0x44288468  $link:0x1025a524
 $ctr:0x00000008   $xer:0x00000010
          Condition status = 0:g 1:g 2:e 3:l 4:l 5:g 6:ge 7:l
        [unset $noflregs to view floating point registers]
        [unset $novregs to view vector registers]
        [unset $novsregs to view vector scalar registers]
in strncmp at 0xd011d920 ($t1)
0xd011d920 (strncmp+0x20) 88030001         lbz   r0,0x1(r3)

(dbx) listi strncmp
0xd011d900 (strncmp)      7c832040        cmpl   cr1,0x0,r3,r4
0xd011d904 (strncmp+0x4)  2c050000        cmpi   cr0,0x0,r5,0x0
0xd011d908 (strncmp+0x8)  4186003c         beq   cr1,0xd011d944 (strncmp+0x44)
0xd011d90c (strncmp+0xc)  3863ffff        addi   r3,-1(r3)
0xd011d910 (strncmp+0x10) 41820034         beq   0xd011d944 (strncmp+0x44)
0xd011d914 (strncmp+0x14) 3884ffff        addi   r4,-1(r4)
0xd011d918 (strncmp+0x18) 7ca903a6       mtctr   r5
0xd011d91c (strncmp+0x1c) 60210000         ori   r1,r1,0x0
0xd011d920 (strncmp+0x20) 88030001         lbz   r0,0x1(r3)
0xd011d924 (strncmp+0x24) 38630001        addi   r3,0x1(r3)
History
Date User Action Args
2020-07-05 13:40:04Michael.Feltsetrecipients: + Michael.Felt, skrah, David.Edelsohn, pablogsal
2020-07-05 13:40:04Michael.Feltsetmessageid: <1593956404.71.0.055479495148.issue41215@roundup.psfhosted.org>
2020-07-05 13:40:04Michael.Feltlinkissue41215 messages
2020-07-05 13:40:03Michael.Feltcreate