Skip to content

Commit

Permalink
Fix Asan warning (not a real problem)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryHRich committed Dec 26, 2024
1 parent 42a134f commit c7cdf77
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion jsrc/ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,9 @@ C jtjobrun(J jt,unsigned char(*f)(J,void*,UI4),void *ctx,UI4 n,I poolno){JOBQ *j
job->next=0; jobq->ht[1]->next=job; jobq->ht[1]=job; // clear chain in job; point the last job to it, and the tail ptr. If queue is empty these both store to tailptr
oldjob=(oldjob==0)?job:oldjob; // Keep old head unless it was empty
++jobq->futex; // while under lock, advance futex value to indicate that we have added a job
I nwaiters=jobq->waiters; // see if there are waiting threads
JOBUNLOCK(jobq,oldjob); // set head pointer, which unlocks.
if(jobq->waiters!=0)jfutex_wakea(&jobq->futex); // if there are waiting threads, wake them up. We test in case there are no worker threads
if(nwaiters!=0)jfutex_wakea(&jobq->futex); // if there are waiting threads, wake them up. We test in case there are no worker threads. Not really necessary to read under lock, but it silences asan
lastqueuedtask=n-1; // if we take this task here, it is special
// todo scaf: would be nice to wake only as many as we have work for
}
Expand Down
2 changes: 1 addition & 1 deletion jsrc/dsusp.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void moveparseinfotosi(J jt){movesentencetosi(jt,jt->parserstackframe.parserstkb
/* ASSERT(blah,EVDOMAIN); */
/* debz() */
// t is the type of stack entry. The entry is allocated and filled in
// the type DCPM is for powt-mortem debugging. It is like DCCALL but chained on jt->pmstacktop rather than jt->sitop, and chained
// the type DCPM is for post-mortem debugging. It is like DCCALL but chained on jt->pmstacktop rather than jt->sitop, and chained
// in bottom-to-top order that must be reversed when transferred to the debug stack
// meanings of the args:
// DCPARSE: x=&tokens y=#tokens
Expand Down
3 changes: 3 additions & 0 deletions jsrc/m.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,9 @@ A jtrealize(J jt, A w){A z; I t;
//
// result is the address of the block, which may have changed if it had to be realized. result can be 0
// if the block could not be realized
//
// On return tnextpushp will be old or old+1, UNLESS (1) w is 0 - no guarantees then; (2) w is VIRTUALBOXED, where we know
// the value is going to be opened & we don't want to free any backers

A jtgc(J jt,A w,A* old){
ARGCHK1(w); // return if no input (could be error or unfilled box)
Expand Down

0 comments on commit c7cdf77

Please sign in to comment.