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

vbcc: retrace hits #52

Closed
polluks opened this issue May 17, 2020 · 5 comments
Closed

vbcc: retrace hits #52

polluks opened this issue May 17, 2020 · 5 comments

Comments

@polluks
Copy link
Collaborator

polluks commented May 17, 2020

This line makes trouble
(set @back 1) (trace) (trace) (set f (askfile (prompt "p") (help "h") (default "d") (back (retrace)))) ; "","Line 1: Max recursion depth exceeded 'retrace' phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 phd001 0",""

--- 20200517 04:11:22 ---
TLSF_FreePooled: pool 0x1400f0f0 ptr 0x22252250 wrong size 591014652 (memory was allocated for 547786005-547786020 bytes)

[20200517 04:11:22] >>> DumpTaskState
----------------------------------------------------------------------
      Task 0x24ed2958 Name 0x24ed6a3c <vfork()'d process> Type 13 Pri 0
     Flags 0x8 State 2 IDNestCnt -1 TDNestCnt -1
  SigAlloc 0x0000ffff    SigWait 0x00000100 SigRecvd 0x04000100 SigExcept 0x00000000
ExceptCode 0x10120dec ExceptData 0x00000000 TrapCode 0x10120de4  TrapData 0x00000000
    Switch 0x00000000     Launch 0x00000000 UserData 0x00000000
   SPLower 0x24ed2a3c    SPUpper 0x24ed6a3c    SPReg 0x22256180
----------------------------------------------------------------------
         ETask 0x215f8054
       MemPool 0x236257f0     PPCLibData 0x00000000
    PPCSPLower 0x252d1fdc     PPCSPUpper 0x252e1fe0
PPCTrapMsgPort 0x00000000 PPCTrapMessage 0x247a2b4c
   PPCRegFrame 0x252e1b00
     Private[] 0x00000000 0x00000000 0x00000000 0x00000000
    EmulHandle 0x00000000
----------------------------------------------------------------------
 EmulHandle 0x252e19b0     Type 0x00000004    Flags 0x00000001
----------------------------------------------------------------------
   SRR0 0x1011ffe4 SRR1 0x02007030
     LR 0x1010f074  CTR 0x11267588
     CR 0x82224882  XER 0x00000000
GPR[00] 11267588 252e0a60 252e19b0 0000bc00 00000006 00000002 0000001f 24224842
GPR[08] 00000000 00000000 00000000 00000000 10001000 255ea740 00000000 00000000
GPR[16] 00000000 00000000 24ed6a3c 24ed2a3c 24ed6a38 00000016 093b4a8f 24ed6a34
GPR[24] 00004000 14001948 252e0e68 215f8054 24ed2958 00000000 10020010 252e1b00
SRR0 -> exec_of_604e.elf Hunk 0 Offset 0x0001ffe4
  LR -> exec_of_604e.elf Hunk 0 Offset 0x0000f074
>>> Task Stack History
----------------------------------------------------------------------
StackFrame[ 0].LR[0x1011e7f8] -> exec_of_604e.elf [Hunk 0 Offset 0x0001e7f8]
StackFrame[ 1].LR[0x1010a0bc] -> exec_of_604e.elf [Hunk 0 Offset 0x0000a0bc]
StackFrame[ 2].LR[0x10106ba4] -> exec_of_604e.elf [Hunk 0 Offset 0x00006ba4]
StackFrame[ 3].LR[0x10294e28] -> dos.elf [Hunk 0 Offset 0x00003168]
StackFrame[ 4].LR[0x10294f90] -> dos.elf [Hunk 0 Offset 0x000032d0]
StackFrame[ 5].LR[0x102b262c] -> dos.elf [Hunk 0 Offset 0x0002096c]
StackFrame[ 6].LR[0x102b2244] -> dos.elf [Hunk 0 Offset 0x00020584]
StackFrame[ 7].LR[0x148f5058] -> MOSSYS:LIBS/ixemul.library [Hunk 1 Offset 0x000460c0]
StackFrame[ 8].LR[0x148f4908] -> MOSSYS:LIBS/ixemul.library [Hunk 1 Offset 0x00045970]
StackFrame[ 9].LR[0x148f41c4] -> MOSSYS:LIBS/ixemul.library [Hunk 1 Offset 0x0004522c]
StackFrame[10].LR[0x1bc4bd4c] -> sh [Hunk 1 Offset 0x0000989c]
StackFrame[11].LR[0x1bc502c4] -> sh [Hunk 1 Offset 0x0000de14]
StackFrame[12].LR[0x1bc4c770] -> sh [Hunk 1 Offset 0x0000a2c0]
StackFrame[13].LR[0x1bc4b4dc] -> sh [Hunk 1 Offset 0x0000902c]
StackFrame[14].LR[0x1bc50664] -> sh [Hunk 1 Offset 0x0000e1b4]
StackFrame[15].LR[0x1bc4b1c4] -> sh [Hunk 1 Offset 0x00008d14]
>>> Full PPC mode: Last 68k context
----------------------------------------------------------------------
   PC 14927d50 SR 0008
Dn[0] 233a2afc 00000015 00001000 1f95ebe0 00000016 094b8494 00000101 00000000
An[0] 24ed2958 22252250 140222bc 23bf4a7c 00000000 102c0a04 14001948 24ed6a34
PC -> MOSSYS:LIBS/ixemul.library Hunk 4 Offset 0x00000158
Stack: 0x24ed6a34
>>> Last saved PPCThread State
----------------------------------------------------------------------
SRR0 0x1011ff18 SRR1 0x200f030 LR 0x1010f074 R1 0x252e1050
GPR[00] 11267588 252e1050 252e1210 0000bc00 00000006 00000002 0000001f 24224842
GPR[08] 00000000 00000000 00000000 00000000 10001000 14021ca0 00000000 1133e21c
GPR[16] 00000002 08adc885 230c839d 00000001 00000001 00000010 24ed2958 00000000
GPR[24] 00000101 00000000 140221a0 230c839d 00000005 148a57e0 148a583c 14001948
  FPSCR 82028000
FPR[00] 3e263120002f6e75 6c6c20323e263120 005c282e2a5c295c 5c222e2a5c242f00
FPR[04] 406cc00000000000 0000000000000000 0000000000000000 3ff0000000000000
FPR[08] 3ff0000000000000 3f90000000000000 41e0000000000000 4330000000000000
FPR[12] 412263ba9a38e38e 3ffa5f5fa6b5e96b 0000000000000000 0000000000000000
FPR[16] 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR[20] 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR[24] 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR[28] 0000000000000000 0000000000000000 0000000000000000 0000000000000000
SRR0 -> exec_of_604e.elf Hunk 0 Offset 0x0001ff18
  LR -> exec_of_604e.elf Hunk 0 Offset 0x0000f074

----------------------------------------------------------------------
    SegList 0x08a23a40        GlobVec 0x140222bc
  StackBase 0x093b4a8f      StackSize 0x00004000
    TaskNum 0x00000007        Result2 0x00000000
 CurrentDir 0x085d6def            CIS 0x088d6bcd
        COS 0x08adc885            CES 0x08c54257
ConsoleTask 0x1a944758 FileSystemTask 0x1436855c
        CLI 0x0836a4f7     ReturnAddr 0x24ed6a38
    PktWait 0x00000000      WindowPtr 0x00000000
     HomeDir 0x0851d373         Flags 0x0000005e
    ExitCode 0x00000000      ExitData 0x00000000
   Arguments 0x00000000  ShellPrivate 0x00000000
[20200517 04:11:22] >>> End of DumpTaskState Dump
----------------------------------------------------------------------
@sodero
Copy link
Owner

sodero commented May 17, 2020

Ah, that one is supposed to bash its head in the ceiling, but not like that. Is it still behaving the same way if you increase the stack size? Do stack cookies (see the beginning of init.c) work with VBCC?

@polluks
Copy link
Collaborator Author

polluks commented May 17, 2020

I had the same suspicion, there's http://www.ibaug.de/vbcc/doc/vbcc_11.html#Stack-4

@sodero
Copy link
Owner

sodero commented May 17, 2020

You could also try to temporarily lower LG_MAXDEP in types.h to see if it's really a stack problem or something else.

@polluks
Copy link
Collaborator Author

polluks commented Jul 19, 2020

Indeed, LG_MAXDEP of 32 works better. Is my commit okay?

@sodero
Copy link
Owner

sodero commented Jul 19, 2020

Nice. The figure 64 was just something I took out of thin hair, 32 will be fine. Some test cases need to be updated though, I'll fix that.

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