Bram Moolenaar <[email protected]> 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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAON-T_gb4MyJrK6zXR_5nf3vf%2BskQKMSh4ioBFYxgQMBee1d3A%40mail.gmail.com.

Raspunde prin e-mail lui