Bram Moolenaar <
Br...@moolenaar.net> wrote:
> Elimar Riesebieter wrote:
>
> > message_test fails on powerpc and i386 (32bit arch):
> >
> > message_test: message_test.c:170: void test_vim_snprintf(void): Assertion `n == 6' failed.
> > Aborted
> > make[1]: *** [Makefile:2242: run_message_test] Error 1
> >
> > Building on amd64 just runs fine.
>
> This should not be platform-dependent. In the build where it fails, can
> you try:
> :echo printf("-%06b-", 12)
>
> What does it show?
>
> Unfortunately assert() doesn't show what the actual value was. You
> could add a printf() to show it.
I can reproduce the assert failure after
building vim-8.2.116 with -m32 to build
for 32-bits x86 (after adding a few :i386 ubuntu
packages).
:echo printf("-%06b-", 12)
-001100-
The output looks as expected at least.
But the test fails indeed:
message_test: message_test.c:170: test_vim_snprintf: Assertion `n == 6' failed.
Putting the following fprintf just before that assert...
fprintf(stderr, "*** n=%d bsize=%d buf=[%s]\n", n, bsize, buf);
It shows:
*** n=63 bsize=0 buf=[]
Value of n is completely wrong!?
The recently added test in vim-8.2.66 finds a bug.
I will debug it soon.
Dominique