[Vm-dev] Win64 cog.spur follow-up

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Fri May 19 21:59:58 UTC 2017


So now that longjmp works, the vm fails when returning from snapshot,
somewhere during startup:

(gdb) run ../../image/trunk50-64-15711.image

Program received signal SIGSEGV, Segmentation fault.
0x00000000000008d4 in ?? ()
(gdb) call printCallStack()

          0xefaf40 M FilePath class(Behavior)>new 0x4611330: a(n) FilePath
class
          0xefaf70 M FilePath class>pathName:isEncoded: 0x4611330: a(n)
FilePath class
          0xefafc0 I FilePath class>pathName: 0x4611330: a(n) FilePath class
          0xefb010 I FileDirectory class>setDefaultDirectory: 0x45fac80:
a(n) FileDirectory class
          0xefb058 I FileDirectory class>startUp 0x45fac80: a(n)
FileDirectory class
          0xefb088 M FileDirectory class(Behavior)>startUp: 0x45fac80: a(n)
FileDirectory class
          0xefb0e0 M [] in SmalltalkImage>send:toClassesNamedIn:with:
0x4653d18: a(n) SmalltalkImage
          0xefb130 I OrderedCollection>do: 0x49a81d8: a(n) OrderedCollection
          0xefb180 I SmalltalkImage>send:toClassesNamedIn:with: 0x4653d18:
a(n) SmalltalkImage
          0xefb1d8 I SmalltalkImage>processStartUpList: 0x4653d18: a(n)
SmalltalkImage
          0xefb230 I SmalltalkImage>snapshot:andQuit:withExitCode:embedded:
0x4653d18: a(n) SmalltalkImage
         0x52187b0 s SmalltalkImage>snapshot:andQuit:embedded:
         0x489ee20 s SmalltalkImage>snapshot:andQuit:

(gdb) i r
rax            0x8d4    2260
rbx            0x6d8018 7176216
rcx            0xefaf18 15707928
rdx            0xefaf20 15707936
rsi            0x506ae18        84323864
rdi            0x6d98f0 7182576
rbp            0xefaf40 0xefaf40
rsp            0xefaf20 0xefaf20
r8             0x3801f27        58728231
r9             0x4611330        73470768
r10            0x5029af8        84056824
r11            0x43fa9a8        71281064
r12            0xffffffff       4294967295
r13            0x10     16
r14            0x3b61540        62264640
r15            0x5654fa0        90525600
rip            0x8d4    0x8d4
eflags         0x10206  [ PF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x53     83
gs             0x2b     43

(gdb) x /8lx $rax
0x8d4:  Cannot access memory at address 0x8d4

(gdb) call shortPrintOop($r10)

0x5029af8: a(n) CompiledMethod$30 = 0

(gdb) call shortPrintOop($r11)

0x43fa9a8: a(n) ByteSymbol$31 = 0

(gdb) call printStringOf($r11)

basicNew

(gdb) call longPrintOop($r10)
         0x5029af8: a(n) CompiledMethod (0x468=>0x45f8168) format 0x1d
nbytes 99 hdr8 ..... hash 0xee279
 0          0x3801ee0          0x3801ee0 327688(0x50008) hasPrim nLits 8
nArgs 0 nTemps 1
 1          0x53b0ce8 #handleFailingBasicNew
 2          0x4771ba8 #insufficient object memory
 3          0x44031d8 #basicNew:
 4          0x43fdff8 #isVariable
 5          0x43f8f30 #primitiveFailed
 6          0x43ffa00 #ifTrue:
 7          0x539b810 a(n) AdditionalMethodState a(n) CompiledMethod ->
0x43fa9a8
 8          0x4955a90 a(n) ClassBinding #Behavior -> 0x4614510

(gdb) call printFrame($rbp)

          0xefaf40 M FilePath class(Behavior)>new 0x4611330: a(n) FilePath
class
          0xefaf50:   rcvr/clsr:          0x4611330     =FilePath
          0xefaf48:   caller ip:          0x3820ab4=58854068
          0xefaf40:    saved fp:           0xefaf70=15708016
          0xefaf38:      method:          0x380e420     0x5025bd0: a(n)
CompiledMethod
          0xefaf38: mcfrm flags:                0x0  numArgs: 0 noContext
notBlock
          0xefaf30:     context:          0x41e78e0     =nil
          0xefaf28:    receiver:          0x4611330     =FilePath
          0xefaf20:        stck:          0x380e4a2     =$▒(0x701c94)
          0xefaf18:        stck:          0x4611330     =FilePath$19 = 0

(gdb) x /16lx $rsp
0xefaf20:       0x0380e4a2      0x00000000      0x04611330      0x00000000
0xefaf30:       0x041e78e0      0x00000000      0x0380e420      0x00000000
0xefaf40:       0x00efaf70      0x00000000      0x03820ab4      0x00000000
0xefaf50:       0x04611330      0x00000000      0x04611330      0x00000000

(gdb) x /11i 0x3820ab4
   0x3820ab4:   push   %r9
   0x3820ab6:   mov    0x10(%rbp),%rdx
   0x3820aba:   mov    0x18(%rbp),%rcx
   0x3820abe:   mov    $0x0,%r8
   0x3820ac5:   callq  0x3800118
   0x3820aca:   pop    %r9
   0x3820acc:   mov    $0x1,%r8
   0x3820ad3:   callq  0x3800080
   0x3820ad8:   mov    %rbp,%rsp
   0x3820adb:   pop    %rbp
   0x3820adc:   retq   $0x18

(gdb) x /20i 0x3800118
   0x3800118:   mov    (%rsp),%r10
   0x380011c:   mov    %r9,(%rsp)
   0x3800120:   push   %rcx
   0x3800121:   push   %rdx
   0x3800122:   push   %r10
   0x3800124:   callq  0x3800028
   0x3800129:   mov    %rbp,0x48(%rbx)
   0x380012d:   mov    %rsp,0x40(%rbx)
   0x3800131:   mov    0xc3140(%rbx),%rsp
   0x3800138:   sub    $0x20,%rsp
   0x380013c:   mov    %r8,%rcx
   0x380013f:   xor    %rdx,%rdx
   0x3800142:   mov    %r9,%r8
   0x3800145:   mov    $0x2,%r9
   0x380014c:   movabs $0x442a90,%rax
   0x3800156:   callq  *%rax
   0x3800158:   add    $0x20,%rsp
   0x380015c:   mov    0x40(%rbx),%rsp
   0x3800160:   mov    0x48(%rbx),%rbp
   0x3800164:   retq

(gdb) x /16i 0x442a90
   0x442a90 <ceSendsupertonumArgs>:     sub    $0x238,%rsp
   0x442a97 <ceSendsupertonumArgs+7>:   mov    %rcx,0x228(%rsp)
   0x442a9f <ceSendsupertonumArgs+15>:  mov    %rdx,0x220(%rsp)
   0x442aa7 <ceSendsupertonumArgs+23>:  mov    %r8,0x218(%rsp)
   0x442aaf <ceSendsupertonumArgs+31>:  mov    %r9,0x210(%rsp)
   0x442ab7 <ceSendsupertonumArgs+39>:  cmpq   $0x0,0x3585d9(%rip)        #
0x79b098 <cFramePointerInUse>
   0x442abf <ceSendsupertonumArgs+47>:  je     0x442b24
<ceSendsupertonumArgs+148>
   0x442ac5 <ceSendsupertonumArgs+53>:  mov    %rbp,%rax
   0x442ac8 <ceSendsupertonumArgs+56>:  mov    $0x1,%cl
   0x442aca <ceSendsupertonumArgs+58>:  mov    %rax,0x140(%rsp)
   0x442ad2 <ceSendsupertonumArgs+66>:  mov    0x140(%rsp),%rax
   0x442ada <ceSendsupertonumArgs+74>:  mov    %rax,0x138(%rsp)
   0x442ae2 <ceSendsupertonumArgs+82>:  mov    0x138(%rsp),%rax
   0x442aea <ceSendsupertonumArgs+90>:  and    $0xf,%rax
   0x442aee <ceSendsupertonumArgs+94>:  cmp    $0x0,%rax
   0x442af2 <ceSendsupertonumArgs+98>:  mov    %cl,0x127(%rsp)

(gdb) x /18i 0x3800080
   0x3800080:   mov    (%rsp),%r10
   0x3800084:   mov    %r9,(%rsp)
   0x3800088:   push   %r10
   0x380008a:   callq  0x3800028
   0x380008f:   mov    %rbp,0x48(%rbx)
   0x3800093:   mov    %rsp,0x40(%rbx)
   0x3800097:   mov    0xc3140(%rbx),%rsp
   0x380009e:   sub    $0x20,%rsp
   0x38000a2:   mov    %r8,%rcx
   0x38000a5:   xor    %rdx,%rdx
   0x38000a8:   mov    %r9,%r8
   0x38000ab:   xor    %r9,%r9
   0x38000ae:   movabs $0x442a90,%rax
   0x38000b8:   callq  *%rax
   0x38000ba:   add    $0x20,%rsp
   0x38000be:   mov    0x40(%rbx),%rsp
   0x38000c2:   mov    0x48(%rbx),%rbp
   0x38000c6:   retq

(gdb) x /5i 0x380e4a2
   0x380e4a2:   mov    $0x0,%r8
   0x380e4a9:   callq  0x381ef60
   0x380e4ae:   mov    %rbp,%rsp
   0x380e4b1:   pop    %rbp
   0x380e4b2:   retq   $0x8

I'm stuck there...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170519/c0121c4c/attachment-0001.html>


More information about the Vm-dev mailing list