xo-reader2: bugfix: checkpoint before allocating SSMs

This commit is contained in:
Roland Conybeare 2026-02-16 11:03:09 -05:00
commit f7f21a4392
18 changed files with 78 additions and 36 deletions

View file

@ -22,11 +22,12 @@ namespace xo {
ParserStack *
ParserStack::push(ParserStack * stack,
DArena::Checkpoint ckp,
DArena & mm,
obj<ASyntaxStateMachine> ssm)
{
DArena::Checkpoint ckp = mm.checkpoint();
//DArena::Checkpoint ckp = mm.checkpoint(); // wrong, must precede allocation of ssm
void * mem = mm.alloc(typeseq::id<ParserStack>(),
sizeof(ParserStack));