Simon Glover wrote:
I've been looking into the cause of these failures, and it seems to be yet another GC bug (or more likely another symptom of the same underlying bug).The problem in this case is in scratchpad_new (in sub.c). This creates a new Scratchpad PMC, and subsequently also creates two new lists (one for the lexical names, the other for the values). When running under --gc-debug, allocating memory for these lists triggers GC/DOD, which garbage collects the Scratchpad. Finally, the function tries to assign to the Scratchpad's data section, which triggers a segfault, since this now points to random memory.
I did check in a fix for the creation sequence of a scratchpad. This does not solve you observed destruction of the Scratchpad itself.
Could you set a breakpoint at lexicals_mark and check, if this gets called during scratchpad_new, and could you check if the scratchpad PMC is on the stack or in a processor register in scratchpad_new?
Simon
leo