make doc has was broken somewhere between 7.6.66 and now. Whoever did it feel free to fix.
/home/zino/hack/Pike/7.6/build/linux-2.6.12-1-686-smp-i686/pike -DNOT_INSTALLED -DPRECOMPILED_SEARCH_MORE -m/home/zino/hack/Pike/7.6/build/linux-2.6.12-1-686-smp-i686/master.pike -x extract_autodoc -q --srcdir=/home/zino/hack/Pike/7.6/lib \ --imgsrc=/home/zino/hack/Pike/7.6/refdoc/src_images --builddir=doc_build/lib \ --imgdir=doc_build/images Bad argument 1 to `()(). Expected string. Unknown program: `()(743)
hmm.
The error on Pike level can be traced back to the following expression in Parser.Pike
sscanf(data[start..pos], "#%*[ \t]charset%*[ \t\]%s%*[ \r\n]", string charset);
data[start..pos] is "#if constant(_assembler_debug)\n" and the value that ends up in charset is 743 (yes, integer).
Testcase:
void main(int num, array args) { string a = args[0];
if(1) { int b=4711; }
sscanf(a, "X%s", string c); write("%O\n", c); }
Thanks, fixed in Pike 7.0, 7.2, 7.4, 7.6 and 7.7. The reason was that local variables reused via the lvalue production weren't cleared.
Was this a bug intruduced after 7.6.66, or did it start manifesting due to some other change?
It was an old bug that was hidden by another bug. When the other bug was fixed this one emerged.
The bug actually could be triggered in older pikes too, but was a bit harder; try the following:
int main(int argc, array(string) argv) { int i;
for (i = 0; i < 4; i++) { sscanf("", "%d", int test); werror("test: %d\n", test); test = i+1; } }
So:
o Fixed bug causing local variables to never be reused, which in turn leads to huge stack frames.
should be changed to "causing local variables to almost never be reused"?
pike-devel@lists.lysator.liu.se