Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized dummy variable making build impossible #28

Closed
dormail opened this issue Mar 18, 2022 · 2 comments
Closed

Uninitialized dummy variable making build impossible #28

dormail opened this issue Mar 18, 2022 · 2 comments

Comments

@dormail
Copy link

dormail commented Mar 18, 2022

I was trying to build KENSv3 and got the same error on both Fedora 35 and Ubuntu 21.10, where a variable is used uninitialized.

[ 26%] Built target routing
In file included from /home/mmaile/git/Computer-Networks/KENSv3-master/build/_deps/googletest-src/googletest/src/gtest-all.cc:42:
/home/mmaile/git/Computer-Networks/KENSv3-master/build/_deps/googletest-src/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
/home/mmaile/git/Computer-Networks/KENSv3-master/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/mmaile/git/Computer-Networks/KENSv3-master/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1290:13: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here
 1290 | static void StackLowerThanAddress(const void* ptr, bool* result) {
      |             ^~~~~~~~~~~~~~~~~~~~~
/home/mmaile/git/Computer-Networks/KENSv3-master/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;

My lazy fix was to change line 1299 in the file from
int dummy;
to
int dummy = 0;
however since those are build files it is only a temporary fix.

@Pusnow
Copy link
Member

Pusnow commented Mar 18, 2022

Hi,

It is GoogleTest's bug: google/googletest#3219 .
I'll update GoogleTest in the future release.

Thanks

@Pusnow
Copy link
Member

Pusnow commented Mar 18, 2022

I updated GoogleTest to its head. (https://github.com/ANLAB-KAIST/KENSv3/releases/tag/v3.3.1)
Please, use latest copy of KENS.

If the issue persists, please reopen.

@Pusnow Pusnow closed this as completed Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants