poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Seg fault in pvm_print_string


From: John Darrington
Subject: Seg fault in pvm_print_string
Date: Fri, 6 Dec 2019 11:04:56 +0100

/*
This file causes a segfault:

#0  0x00005555555d2552 in pvm_print_string (string=4294967353) at 
poke/src/pvm-val.c:1137
#1  0x00005555555ec21b in pvm_execute_or_initialize (jitter_initialize=false, 
    jitter_initial_program_point=0x555555a58f40, 
jitter_original_state=0x555555823ab0)
    at poke/src/pvm.jitter:779
#2  0x00005555555d9457 in pvm_execute_executable_routine (er=0x555555823670, 
s=0x555555823ab0)
    at poke/src/pvm.jitter:440
#3  0x00005555555d2d0d in pvm_execute_routine (r=0x555555a2b180, 
s=0x555555823ab0) at pvm-vm1.c:548
#4  0x00005555555cea70 in pvm_run (apvm=0x555555823ab0, routine=0x555555a2b180, 
res=0x7fffffffdf18)
    at poke/src/pvm.c:123
#5  0x000055555556fde5 in pkl_compile_file (compiler=0x55555582e620, 
fname=0x5555559e0740 "crash.pk")
    at poke/src/pkl.c:447
#6  0x000055555556de17 in pk_cmd_load_file (argc=1, argv=0x7fffffffe000, 
uflags=0)
    at poke/src/pk-file.c:275
#7  0x000055555556ccdd in pk_cmd_exec_1 (str=0x5555559d5951 "load crash.pk", 
cmds_trie=0x555555907bc0, prefix=0x0)
    at poke/src/pk-cmd.c:565
#8  0x000055555556ce96 in pk_cmd_exec (str=0x5555559d5950 ".load crash.pk") at 
poke/src/pk-cmd.c:613
#9  0x000055555556d1cc in pk_cmd_exec_script (filename=0x7fffffffe61b 
"crash.script")
    at poke/src/pk-cmd.c:716
#10 0x0000555555565cb5 in parse_args (argc=5, argv=0x7fffffffe318) at 
poke/src/poke.c:272
#11 0x0000555555566019 in main (argc=5, argv=0x7fffffffe318) at 
poke/src/poke.c:397


To reproduce:

.set pretty-print yes
.file /dev/zero
.load <this-file>
*/

deftype foo = struct
{
  char[2] c;

  defun _print = void:
    {
      print "#<";
      printf "%<foo:%s%>", catos (c);
      print ">";
    }
};

defun ugg = (offset<int, foo> ip) uint<8>:
{
    printf ("IP %v \n", foo @ ip);
    return 1;
}

deftype bar = struct
  {
    foo               a;
    foo[2]   data : ugg (a'offset);
};

defvar x = bar @ 0#B;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]