Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regex sets: fix Solaris optimiser bug
[perl #127455] On Solaris with -DDEBUGGING, re/regex_sets.t was failing to compile. This appears to be due to an optimiser bug. The code in question looked like: handle_operand: top_index = av_tindex_nomg(stack); if (top_index - fence >= 0) { ... } printf()ing the value of fence after the av_tindex_nomg() showed that its value was corrupted (compared with its expected value based on a different platform with the same debugging print). However, putting a another printf prior to the av_tindex_nomg() call not only displayed the correct value, but caused the later printf() to also display the correct value. It seems that merely accessing fence prior to av_tindex_nomg() avoids the corruption. Simplifying the av_tindex_nomg(), the bad behaviour could be reduced to: if (!stack) { __assert( "" , "", 1); } Putting a printf after this gave a corrupted fence; a printf before made everything work. So this workaround commit just makes sure that fence is accessed prior to calling av_tindex_nomg().
- Loading branch information