Release stopper: %4H seems to be broken:
sprintf("%4H", "hello");
sprintf: Length of string to %4H too large. HilfeInput:1: HilfeInput()->___HilfeWrapper()
I've checked in a test-case, so Pikefarm should light up yellow shortly.
I'm a little curious that the committ message says that the problem is fixed for 32 bit architectures, but I can reproduce the problem on amd64. Does this mean that the problem is not fixed on that architecture?
I'm a little curious that the committ message says that the problem is fixed for 32 bit architectures, but I can reproduce the problem on amd64. Does this mean that the problem is not fixed on that architecture?
The problem was there on LP64 architectures as well (but maybe not on ILP64). Anyway; the bug should be fixed on all architectures now.
Hm, methinks you only moved the problem:
Pike v7.8 release 263 running Hilfe v3.5 (Incremental Pike Frontend)
string s = "x"*300; strlen(sprintf("%8H", s));
(1) Result: 308
strlen(sprintf("%9H", s));
sprintf: Length of string to %9H too large. HilfeInput:1: HilfeInput()->___HilfeWrapper()
strlen(sprintf("%10H", s));
(2) Result: 310
Hmm... it seems the right-shift operator masks the shift with the number of bits in the type of the operand...
| if( (tmp>>((l-1)*8)) & ~0xff ) | sprintf_error(fs, "Length of string to %%%"PRINTPTRDIFFT"dH " | "too large: %"PRINTPTRDIFFT"d:%"PRINTPTRDIFFT"d.\n", | l, tmp, (tmp>>((l-1)*8)));
==>
string q = "foo"*300; sizeof(sprintf("%5H", q));
sprintf: Length of string to %5H too large: 900:900. HilfeInput:1: HilfeInput()->___HilfeWrapper()
Any chance of reproducing that with a less humongus that can be cleanly hardcoded into the test suite? :)
The problem is fixed, but it wouldn't hurt to have the known failures in there.
pike-devel@lists.lysator.liu.se