msan detects uninitialized variables in tar1.34

2023-03-08 Thread 2773414454
Hello. Enable the msan compilation option and compile the tar1.34 in clang.(https://clang.llvm.org/docs/MemorySanitizer.html) msan detects uninitialized variables in tar1.34 #/home/tar-1.34/src/tar -cf /home/new.tar /home/lost+found/ /home/tar-1.34/src/tar: Removing leading ??/' from member na

Re: msan detects uninitialized variables in tar1.34

2023-03-08 Thread Sergey Poznyakoff
That's a false positive. Ignore it. > @@ -283,6 +283,7 @@ static int > is_regular_file (const char *name) > { > struct stat stbuf; > + memset(&stbuf,0,sizeof(struct stat)); > >if (stat (name, &stbuf) == 0) That's utterly useless: stbuf is used only if stat returns success, and in this c