Skip to content

Commit

Permalink
Crash when dbr 1 in suspension
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryHRich committed Oct 15, 2024
1 parent 94bae8e commit 8fad095
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions jsrc/cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ A jtopenforassembly(J jt, A x){
else if(!HOMO(jt->etxinfo->asseminfo.assemorigt,AT(AAV(x)[i]))){jt->etxinfo->asseminfo.assemwreckt=AT(AAV(x)[i]); jt->etxinfo->asseminfo.assemwreckofst=i; break;}}
)
jt->etxinfo->asseminfo.assemshape[0]=AS(x)[0]; // results were in a list
jt->jerr=EVASSEMBLY; // switch t o assembly error type
jt->jerr=EVASSEMBLY; // switch to assembly error type
}
R z;
}

static DF1(jtpowseqlim){PROLOG(0039);A x,y,z,*zv;I i,n;
static DF1(jtpowseqlim){PROLOG(0039);A x,y,z,*zv;I i,n; // scaf make bivalent & use zap
ARGCHK1(w);
RZ(z=exta(BOX,1L,1L,20L)); zv=AAV(z); INCORP(w); *zv++=x=w;
i=1; n=AN(z);
Expand Down
2 changes: 1 addition & 1 deletion jsrc/d.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* Debug */


// values returned in box 0 of an AFDEBUGRESULT value - big enough to be an integer
// values returned in box 0 of a boxed AFDEBUGRESULT value - big enough to be an integer

#define SUSCLEAR 7 /* clear stack */
#define SUSRUN 2 /* run again */
Expand Down
2 changes: 1 addition & 1 deletion jsrc/dsusp.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static A jtsusp(J jt, C superdebug){A z;
// suspension result and we would lose them. Fortunately they have no arguments. debugmux also eats the result of 13!:0]0
if(!(jt->uflags.trace&TRACEDB1)){z=0; break;} // if we are clearing the stack (13!:0), we exit all suspensions. z could have anything, so we clear it to prevent it from being analyzed as a suspension.
if(JT(jt,dbuser)&TRACEDBSUSCLEAR+TRACEDBSUSSS)break; // dbr 0/1 forces immediate end of suspension, as does single-step request
if(z&&AFLAG(z)&AFDEBUGRESULT&&IAV(C(AAV(z)[0]))[0]==SUSTHREAD){ // (0;0) {:: z; is this T. y?
if(z && AFLAG(z)&AFDEBUGRESULT && AT(z)&BOX && IAV(C(AAV(z)[0]))[0]==SUSTHREAD){ // (0;0) {:: z; is this T. y?
ASSERTSYS(0,"debug thread"); continue; // scaf
J newjt=JTFORTHREAD(jt,IAV(C(AAV(z)[1]))[0]); // T. y - switch to the indicated thread
if(savcstackmin!=0)jt->cstackmin=savcstackmin; // if the old jt had a modified stack limit, restore it
Expand Down

0 comments on commit 8fad095

Please sign in to comment.