DynamoRIO / DynamoRIO/dynamorio
BUILD: drmemory build failure, uninitialized arg value in drsyscall_linux.c
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
**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 DynamoRIO are you using? git head @bfbc4a118a58a182770d306120cad41b9893c53
Contributor guide
Assessment
This issue has not been assessed yet.