[EMAIL PROTECTED] writes: > if first malloc() fails in yyinitGLRStack()then > the second one is done because it is missing : > `if (!yystack->yyitems) return false; ' (line 975)
But if that line is inserted into yyinitGLRStack, then yyinitStateSet won't be called, which means that yytops.yystates will be garbage, which can cause the code after yyreturn to crash. > Can be assumed Bison generated GLR parsers are > used on specialistic embedded GNU/Linux micro > controllers with different c-libs which possibly > do not like such situation. Why wouldn't such implementations work with th the current code? I don't see any undefined behavior. Or are you worried about efficiency? I.e., that the second malloc doesn't need to be called if the first malloc fails? I don't think we need to worry about that sort of optimization in this (presumably) unusual error case. It's better to keep the code short and simple.
