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

BUILD: drmemory build failure, uninitialized arg value in drsyscall_linux.c #2523

Open
xdje42 opened this issue Oct 4, 2024 · 1 comment
Assignees

Comments

@xdje42
Copy link
Contributor

xdje42 commented Oct 4, 2024

Describe the bug

The following build failure is seen with recent gcc (13.2.0) on 64-bit linux of recent vintage.

/tmp/drmemory/drsyscall/drsyscall_linux.c: In function ‘handle_semctl’:
/tmp/drmemory/drsyscall/drsyscall_linux.c:981:9: error: ‘arg_val’ is used uninitialized [-Werror=uninitialized]
  981 |     arg = *(union semun *) &arg_val;
      |     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/drmemory/drsyscall/drsyscall_linux.c:975:15: note: ‘arg_val’ declared here
  975 |     ptr_int_t arg_val;
      |               ^~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [drsyscall/CMakeFiles/drsyscall_static.dir/build.make:104: drsyscall/CMakeFiles/drsyscall_static.dir/drsyscall_linux.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5315: drsyscall/CMakeFiles/drsyscall_static.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

To Reproduce

$ git clone https://github.com/DynamoRIO/drmemory.git
$ cd drmemory
$ ./make/git/dev-setup.sh
$ cd ..
$ mkdir build
$ cd build
$ cmake ../drmemory
$ make -k # other failures may be present: -k keeps going so that union semun failure is seen

Versions

  • What version of Dr. Memory are you using? git head @bfbc4a118a58a182770d306120cad41b9893c53
@xdje42
Copy link
Contributor Author

xdje42 commented Oct 4, 2024

Data point: #5130 also mentions this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant