Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pike pike
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 104
    • Issues 104
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pikelang
  • pikepike
  • Issues
  • #2293
Closed
Open
Issue created Sep 17, 2001 by Peter Bortas@zinoOwner

F_ESCAPE_CATCH fails on MacOS X/PPC --with-machine-code

Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2293

Reported by @grubba

Doing test 5914 (5914 total)
  1: mixed a() {
  2:   int a, b;
  3: foo:
  4:   for (int i = 1; i <= 4; i++) {
  5:     a = i;
  6:     catch {
  7:       catch {
  8:    if (i >= 3) break foo;
  9:    if (i >= 2) continue foo;
 10:       };
 11:     };
 12:     b = i;
 13:   }
 14:   return ({a, b});
 15: ; }
 16: mixed b() { return ({3, 1}); }

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x00010b48 in opcode_F_ESCAPE_CATCH () at
/home/grubba/src/Pike/7.3/src/interpret_functions.h:1140
1140    OPCODE0_RETURN(F_ESCAPE_CATCH, "escape catch", {
(gdb) p Pike_interpreter
$1 = {
  stack_pointer = 0xc7c2f8,
  evaluator_stack = 0xc7c000,
  mark_stack_pointer = 0xd40000,
  mark_stack = 0xd40000,
  frame_pointer = 0xbf20f8,
  evaluator_stack_malloced = 1,
  mark_stack_malloced = 0,
  recoveries = 0xbfffe7c8,
  thread_id = 0xbf3400,
  stack_top = 0xbff87fff "",
  svalue_stack_margin = 100,
  c_stack_margin = 8000,
  t_flag = 0
}
(gdb) p *Pike_interpreter.frame_pointer
$2 = {
  refs = 1,
  args = 0,
  fun = 0,
  num_locals = 3,
  num_args = 0,
  flags = 0,
  ident = 0,
  next = 0xbf229c,
  scope = 0x0,
  pc = 0x80610038,
  locals = 0xc7c2c8,
  save_sp = 0xc7c2c0,
  expendible = 0xc7c2e0,
  save_mark_sp = 0xd40000,
  mark_sp_base = 0xd40000,
  current_object = 0x3a6d4d0,
  context = {
    inherit_level = 0,
    identifier_level = 0,
    parent_identifier = -1,
    parent_offset = -18,
    storage_offset = 0,
    parent = 0x0,
    prog = 0x105a00c,
    name = 0x0
  },
  current_storage = 0x3a6c0b0 ""
}
(gdb) disassemble
Dump of assembler code for function opcode_F_ESCAPE_CATCH:
0x10b10 <opcode_F_ESCAPE_CATCH>:        mflr    r0
0x10b14 <opcode_F_ESCAPE_CATCH+4>:      bcl     20,4*cr7+so,0x10b18
<opcode_F_ESCAPE_CATCH+8>
0x10b18 <opcode_F_ESCAPE_CATCH+8>:      mflr    r12
0x10b1c <opcode_F_ESCAPE_CATCH+12>:     mtlr    r0
0x10b20 <opcode_F_ESCAPE_CATCH+16>:     lwz     r10,-32(r1)
0x10b24 <opcode_F_ESCAPE_CATCH+20>:     addis   r9,r12,63
0x10b28 <opcode_F_ESCAPE_CATCH+24>:     lwz     r9,-3628(r9)
0x10b2c <opcode_F_ESCAPE_CATCH+28>:     addis   r11,r12,63
0x10b30 <opcode_F_ESCAPE_CATCH+32>:     lwz     r0,8(r10)
0x10b34 <opcode_F_ESCAPE_CATCH+36>:     lwz     r10,16(r9)
0x10b38 <opcode_F_ESCAPE_CATCH+40>:     stw     r0,28(r10)
0x10b3c <opcode_F_ESCAPE_CATCH+44>:     lwz     r11,-3568(r11)
0x10b40 <opcode_F_ESCAPE_CATCH+48>:     lwz     r9,-32(r1)
0x10b44 <opcode_F_ESCAPE_CATCH+52>:     lwz     r0,0(r11)
0x10b48 <opcode_F_ESCAPE_CATCH+56>:     stw     r0,8(r9)
0x10b4c <opcode_F_ESCAPE_CATCH+60>:     blr
End of assembler dump.
(gdb) info reg
r0             0xac94   44180
r1             0xbfffe740       3221219136
r2             0x80972be8       2157390824
r3             0xc7c2f8 13091576
r4             0xc7c300 13091584
r5             0x1884c  100428
r6             0x700148a0       1879132320
r7             0x4      4
r8             0x8      8
r9             0x70014680       1879131776
r10            0xbf20f8 12525816
r11            0x4915e4 4789732
r12            0x10b18  68376
r13            0x0      0
r14            0x0      0
r15            0x0      0
r16            0x0      0
r17            0x0      0
r18            0x0      0
r19            0x0      0
r20            0x0      0
r21            0x0      0
r22            0x0      0
r23            0x0      0
r24            0x0      0
r25            0x0      0
r26            0xbffff890       3221223568
r27            0x4c     76
r28            0x3a5d470        61199472
r29            0x478ed0 4689616
r30            0x3      3
r31            0x478ed0 4689616
pc             0x10b48  68424
ps             0xf030   61488
cr             0x48000002       1207959554
lr             0x3a5d548        61199688
ctr            0xcba44  834116
xer            0x20000004       536870916
mq             0x0      0
fpscr          0xaa002100       2852135168
vrsave         0x0      0
Assignee
Assign to
Time tracking