mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
Do not reuse temp registers originally allocated to a subroutine within
the main body of the program logic, since if the subroutine is called while the reused temp registers are in use, their values will get clobbered. Candidate fix for ticket [3a77c9714e63330] FossilOrigin-Name: 092d53315e50be42b51ef7b3069c82c32a129b6a
This commit is contained in:
@@ -3762,3 +3762,11 @@ void sqlite3ReleaseTempRange(Parse *pParse, int iReg, int nReg){
|
||||
pParse->iRangeReg = iReg;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Mark all temporary registers as being unavailable for reuse.
|
||||
*/
|
||||
void sqlite3ClearTempRegCache(Parse *pParse){
|
||||
pParse->nTempReg = 0;
|
||||
pParse->nRangeReg = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user