Changeset 6315


Ignore:
Timestamp:
Apr 20, 2007, 9:01:17 AM (15 years ago)
Author:
gb
Message:

mark_xp: if rip is unmarked and tagged as a return address, treat
it as one. (It's generally possible for RIP to be tagged as anything,
but except in the case of returning to the instruction which reloads
FN from RIP, some other register in the exception frame should cause
the instruction pointer to have been marked.) We need to do this,
since we're relaxing the restriction that ra0 always contain a return
address on function return.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/x8664-call/ccl/lisp-kernel/x86-gc.c

    r6306 r6315  
    14671467mark_xp(ExceptionInformation *xp)
    14681468{
    1469   natural *regs = (natural *) xpGPRvector(xp);
    1470 
     1469  natural *regs = (natural *) xpGPRvector(xp), dnode;
     1470  LispObj rip;
     1471   
     1472 
    14711473
    14721474  mark_root(regs[Iarg_z]);
     
    14821484  mark_root(regs[Itemp1]);
    14831485  mark_root(regs[Itemp2]);
    1484   /* If the IP isn't pointing into a marked function,
    1485      we're in big trouble.  Check for that here ? */
     1486  /* If the RIP isn't pointing into a marked function,
     1487     we can -maybe- recover from that if it's tagged as
     1488     a TRA. */
     1489  rip = regs[Iip];
     1490  dnode = gc_area_dnode(rip);
     1491  if ((dnode < GCndnodes_in_area) &&
     1492      (! ref_bit(GCmarkbits,dnode))) {
     1493    if (tag_of(rip) == tag_tra) {
     1494      mark_root(rip);
     1495    } else {
     1496      Bug(NULL, "Can't find function for rip 0x%16lx",rip);
     1497    }
     1498  }
    14861499}
    14871500
Note: See TracChangeset for help on using the changeset viewer.