SimpleProgramAnalyser / spa

A CMake Windows program for a SIMPLE language
GNU General Public License v3.0
3 stars 0 forks source link

getStatementType() crashes the program if it encounters an out-of-bounds statement number #128

Closed ChesterSim closed 4 years ago

ChesterSim commented 4 years ago

getStatementType() has an assertion that prevents statement numbers that are out-of-bounds to be evaluated.

This is done based on the understanding that Next evaluator should never pass in an out-of-bounds statement number to getStatementType(). However, this has since changed, as there are more clients of getStatementType() now, including Affects/ Evaluator.

PQL queries that include out-of-bounds statement number to Affects/* Evaluator will then trigger a failed assertion.