Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote:
>Stephen R. van den Berg wrote:
>> >>Please provide a full example.

>> Shortest example so far:

>> $ pike -e "foo::bar = 1;"
>> -:2:No inherit or surrounding class foo.
>> Segmentation fault

>I can't reproduce the crash:

>| $ ./pike -e "foo::bar = 1;"
>| -:2:No inherit or surrounding class foo.
>| Compilation failed.
>| $ echo $?
>| 20

>Please provide the backtrace of the crash from a debugger.

Program received signal SIGSEGV, Segmentation fault.
0x000055555561c6b5 in find_inherited_identifier (inherit_state=0x5555557e7140, 
    inherit_depth=0, inh=1, ident=0x55555590a308)
    at /var/src/roxen/81pike/src/program.c:2304
2304      return program_magic_identifier(inherit_state, inherit_depth, inh, 
ident, 1);
(gdb) where
#0  0x000055555561c6b5 in find_inherited_identifier (
    inherit_state=0x5555557e7140, inherit_depth=0, inh=1, ident=0x55555590a308)
    at /var/src/roxen/81pike/src/program.c:2304
#1  0x00005555555727ae in yyparse () at language.yacc:4232
#2  0x0000555555610b75 in do_yyparse ()
    at /var/src/roxen/81pike/src/pike_compiler.cmod:362
#3  0x00005555556151a5 in run_pass1 (c=0x5555557d4a00)
    at /var/src/roxen/81pike/src/pike_compiler.cmod:1050
#4  f_compilation_compile (args=0)
    at /var/src/roxen/81pike/src/pike_compiler.cmod:1657
#5  0x0000555555584d6f in lower_mega_apply (args=args@entry=0, 
    o=o@entry=0x5555557ca2b0, fun=1)
    at /var/src/roxen/81pike/src/interpret.c:2285
#6  0x0000555555585612 in jump_opcode_F_CALL_OTHER (arg1=13)
    at /var/src/roxen/81pike/src/interpret_functions.h:2424
#7  0x00007ffff753cdad in ?? ()
#8  0x0000000000000091 in ?? ()
#9  0x0000000000000000 in ?? ()
(gdb) list
2299          return mkidentifiernode(id);
2300        }
2301        if (inh < 0) inh = -1;
2302      }
2303    
2304      return program_magic_identifier(inherit_state, inherit_depth, inh, 
ident, 1);
2305    }
2306    
2307    /*! @decl constant this
2308     *!
(gdb) p *inherit_state
$1 = {previous = 0x55555587c5d0, last_line = 93824994705424, last_file = 0x0, 
  fake_object = 0x0, new_program = 0x0, malloc_size_program = 0x0, 
  init_node = 0x0, last_pc = 861, num_parse_error = 0, compiler_frame = 0x0, 
  num_used_modules = 0, compiler_pass = 3, local_class_counter = 0, 
  catch_level = 0, current_modifiers = 1, current_annotations = 0x0, 
  current_attributes = 0x0, varargs = 0, num_create_args = 0, num_inherits = 1, 
  last_identifier = 0x0, module_index_cache = 0x0, type_stackp = 
0x7ffff75d6000, 
  pike_type_mark_stackp = 0x7ffff75a5018, parent_identifier = 50, 
  compat_major = 8, compat_minor = 1, flags = 0, compiler = 0x0, 
  node_allocator = {l = {offset = 40880, block_size = 80, blocks = 512, 
      alignment = 0, doffset = 16}, size = 0 '\000', last_free = 0 '\000', 
    alloc = 0 '\000', pages = {0x0 <repeats 24 times>}}}
(gdb) p *ident
$2 = {refs = 2, flags = 24 '\030', size_shift = 0 '\000', alloc_type = 2 
'\002', 
  struct_type = 0 '\000', min = 97 'a', max = 114 'r', len = 3, 
  hval = 2164092984, next = 0x0, str = 0x555555909de0 "bar"}

-- 
Stephen.
  • SEGFAULT in Pike 8... Stephen R. van den Berg
    • SEGFAULT in P... Henrik Grubbström (Lysator) @ Pike (-) developers forum
      • Re: SEGFA... Stephen R. van den Berg
        • Re: S... Stephen R. van den Berg
          • R... Henrik Grubbström (Lysator) @ Pike (-) developers forum
            • ... Stephen R. van den Berg
              • ... Henrik Grubbström (Lysator) @ Pike (-) developers forum
                • ... Stephen R. van den Berg
                • ... Stephen R. van den Berg
                • ... Henrik Grubbström (Lysator) @ Pike (-) developers forum
                • ... Stephen R. van den Berg
                • ... Henrik Grubbström (Lysator) @ Pike (-) developers forum
                • ... Stephen R. van den Berg
                • ... Stephen R. van den Berg
                • ... Henrik Grubbström (Lysator) @ Pike (-) developers forum
                • ... Stephen R. van den Berg

Reply via email to