[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#831449: lintian on Sid amd64 reports volatile false spelling errors in binaries



Hi,

Jakub Wilk wrote:
> In my tests (on a tiny test program) -fno-builtin-strcpy did the trick...

There are other functions where constant arguments get treated that way.

GNU xorriso-1.4.4 would need :

  export CFLAGS="-fno-builtin-strcpy -fno-builtin-sprintf -fno-builtin-strcat -fno-builtin-strncpy"

One would have to check the quite long list on
  https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
for more candidates if plain -fno-builtin is not acceptable.

--------------------------------------------------------------------------
Long story:

I tested on Debian 8 and now verified on Sid VM that -fno-builtin-strcpy
does not suffice for

  wget http://www.gnu.org/software/xorriso/xorriso-1.4.4.tar.gz
  tar xzf xorriso-1.4.4.tar.gz
  cd xorriso-1.4.4
  export CFLAGS="-fno-builtin-strcpy"
  ./configure && make

(The warning "-Wlogical-not-parentheses" is harmless and meanwhile silenced
 upstream.)

Around line 200 of

  strings xorriso/xorriso | less

i see

  Program H
  error: PH
  ermstackH

After

  export CFLAGS="-fno-builtin"
  make clean
  ./configure && make

i see

  Program error: Permstack_pop() : cannot find stopper

from  xorriso/aux_objects.c 

  sprintf(xorriso->info_text,
          "Program error: Permstack_pop() : cannot find stopper");

So constant sprintf() format strings get optimized, too.

  export CFLAGS="-fno-builtin-strcpy -fno-builtin-sprintf"
  make clean
  ./configure && make

yields chopped text from e.g.

  strcat(name, "md5_mismatch");
  strncpy(out_text, "'xorriso: TEXT MUCH TOO LONG ...   ",33);

--------------------------------------------------------------------------

Have a nice day :)

Thomas


Reply to: