Wow, Herman! Thank you, that was fast. Can you give some insight as to how you found it so quickly?
On Wed, Oct 15, 2025, 1:11 AM Herman ten Brugge via Tinycc-devel < [email protected]> wrote: > Op 14-10-2025 om 21:52 schreef Eric Raible: > > TCCStates should (obviously) be completely independent. > But this corner case shows that a syntax error in the first > one prevents subsequent TCCStates from failing on *correct code*. > My guess would be that a longjmp while processing the syntax > error in the global declaration skips the reset of something associated > with symbol tables. > > This is as far as I got: In the non-error case, the first name that > relocate_syms() finds is "memset". In the error case, the first name > that it finds is "L.2". That's probably a good clue for people smarter > than me. The memset is probably required to initialize the stack-allocated > struct, but for some reason things work when that struct is explicitly > declared (vs. initialized inline). > > The code below shows the error when run with an argument. > It works as expected with no arguments. [I apologize for any > formatting errors, I suck at getting gmail to do what I intend.] > > > I pushed a patch to mob. > The global variable 'global_expr' in tccgen.c was not initialized every > time. > > Herman > _______________________________________________ > Tinycc-devel mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/tinycc-devel >
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
