Compiler warning about uninitialized variables #1

Open
opened 2024-04-16 03:04:37 +00:00 by jade · 1 comment
Owner
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/41sswc6mrl67i4ds6hsxdpyx9wy8xzpp-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
mesonConfigurePhase flags: --prefix=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4 --libdir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/lib --libexecdir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/libexec --bindir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/bin --sbindir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/sbin --includedir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/include --mandir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/share/man --infodir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/share/info --localedir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/share/locale -Dauto_features=enabled -Dwrap_mode=nodownload --buildtype=debugoptimized
The Meson build system
Version: 1.3.2
Source dir: /build/source
Build dir: /build/source/build
Build type: native build
Project name: nix-eval-jobs
Project version: 0.1.6
C++ compiler for the host machine: g++ (gcc 13.2.0 "g++ (GCC) 13.2.0")
C++ linker for the host machine: g++ ld.bfd 2.40
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: YES (/nix/store/492n7ylp2f9zn0k3vghv1snypgkzznc5-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2
Run-time dependency nix-main found: YES 2.90.0-lixpre20240415-866c76c
Run-time dependency nix-store found: YES 2.90.0-lixpre20240415-866c76c
Run-time dependency nix-expr found: YES 2.90.0-lixpre20240415-866c76c
Run-time dependency nix-cmd found: YES 2.90.0-lixpre20240415-866c76c
Run-time dependency threads found: YES
Run-time dependency nlohmann_json found: YES 3.11.3
Run-time dependency Boost found: YES 1.81.0 (/nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev)
Checking whether type "struct dirent" has member "d_type" : YES 
Configuring autotools-config.h using configuration
Build targets in project: 1

nix-eval-jobs 0.1.6

  User defined options
    auto_features: enabled
    bindir       : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/bin
    buildtype    : debugoptimized
    includedir   : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/include
    infodir      : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/share/info
    libdir       : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/lib
    libexecdir   : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/libexec
    localedir    : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/share/locale
    mandir       : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/share/man
    prefix       : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4
    sbindir      : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/sbin
    wrap_mode    : nodownload

Found ninja-1.11.1 at /nix/store/3dj1s1bhxanq3f0nffwf786l71g1lcn6-ninja-1.11.1/bin/ninja
mesonConfigurePhase: enabled\ parallel\ building
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
build flags: -j24 -v
[1/6] g++ -Isrc/nix-eval-jobs.p -Isrc -I../src -I/nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix -I/nix/store/bb7nl1a8vva0svj1lka0fxr761cykd6h-boehm-gc-8.2.4-dev/include -I/nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev/include -I/nix/store/9q78dj4vk17hmd19pzx8kqh18f2vvsl9-nlohmann_json-3.11.3/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -pthread -DBOOST_ALL_NO_LIB -std=c++2a -std=c++2a -std=c++2a -std=c++2a -std=c++2a -fvisibility=hidden --include autotools-config.h -MD -MQ src/nix-eval-jobs.p/buffered-io.cc.o -MF src/nix-eval-jobs.p/buffered-io.cc.o.d -o src/nix-eval-jobs.p/buffered-io.cc.o -c ../src/buffered-io.cc
[2/6] g++ -Isrc/nix-eval-jobs.p -Isrc -I../src -I/nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix -I/nix/store/bb7nl1a8vva0svj1lka0fxr761cykd6h-boehm-gc-8.2.4-dev/include -I/nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev/include -I/nix/store/9q78dj4vk17hmd19pzx8kqh18f2vvsl9-nlohmann_json-3.11.3/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -pthread -DBOOST_ALL_NO_LIB -std=c++2a -std=c++2a -std=c++2a -std=c++2a -std=c++2a -fvisibility=hidden --include autotools-config.h -MD -MQ src/nix-eval-jobs.p/eval-args.cc.o -MF src/nix-eval-jobs.p/eval-args.cc.o.d -o src/nix-eval-jobs.p/eval-args.cc.o -c ../src/eval-args.cc
[3/6] g++ -Isrc/nix-eval-jobs.p -Isrc -I../src -I/nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix -I/nix/store/bb7nl1a8vva0svj1lka0fxr761cykd6h-boehm-gc-8.2.4-dev/include -I/nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev/include -I/nix/store/9q78dj4vk17hmd19pzx8kqh18f2vvsl9-nlohmann_json-3.11.3/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -pthread -DBOOST_ALL_NO_LIB -std=c++2a -std=c++2a -std=c++2a -std=c++2a -std=c++2a -fvisibility=hidden --include autotools-config.h -MD -MQ src/nix-eval-jobs.p/worker.cc.o -MF src/nix-eval-jobs.p/worker.cc.o.d -o src/nix-eval-jobs.p/worker.cc.o -c ../src/worker.cc
[4/6] g++ -Isrc/nix-eval-jobs.p -Isrc -I../src -I/nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix -I/nix/store/bb7nl1a8vva0svj1lka0fxr761cykd6h-boehm-gc-8.2.4-dev/include -I/nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev/include -I/nix/store/9q78dj4vk17hmd19pzx8kqh18f2vvsl9-nlohmann_json-3.11.3/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -pthread -DBOOST_ALL_NO_LIB -std=c++2a -std=c++2a -std=c++2a -std=c++2a -std=c++2a -fvisibility=hidden --include autotools-config.h -MD -MQ src/nix-eval-jobs.p/drv.cc.o -MF src/nix-eval-jobs.p/drv.cc.o.d -o src/nix-eval-jobs.p/drv.cc.o -c ../src/drv.cc
[5/6] g++ -Isrc/nix-eval-jobs.p -Isrc -I../src -I/nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix -I/nix/store/bb7nl1a8vva0svj1lka0fxr761cykd6h-boehm-gc-8.2.4-dev/include -I/nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev/include -I/nix/store/9q78dj4vk17hmd19pzx8kqh18f2vvsl9-nlohmann_json-3.11.3/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -pthread -DBOOST_ALL_NO_LIB -std=c++2a -std=c++2a -std=c++2a -std=c++2a -std=c++2a -fvisibility=hidden --include autotools-config.h -MD -MQ src/nix-eval-jobs.p/nix-eval-jobs.cc.o -MF src/nix-eval-jobs.p/nix-eval-jobs.cc.o.d -o src/nix-eval-jobs.p/nix-eval-jobs.cc.o -c ../src/nix-eval-jobs.cc
In file included from /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/memory:78,
                 from /nix/store/9q78dj4vk17hmd19pzx8kqh18f2vvsl9-nlohmann_json-3.11.3/include/nlohmann/json_fwd.hpp:14,
                 from /nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix/config.hh:8,
                 from /nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix/eval-settings.hh:3,
                 from ../src/nix-eval-jobs.cc:3:
In member function 'void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = LineReader]',
    inlined from 'void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = LineReader]' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/bits/unique_ptr.h:93:7,
    inlined from 'std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = LineReader; _Dp = std::default_delete<LineReader>]' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/bits/unique_ptr.h:404:17,
    inlined from 'constexpr void std::_Optional_payload_base<_Tp>::_M_destroy() [with _Tp = std::unique_ptr<LineReader>]' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/optional:287:35,
    inlined from 'constexpr void std::_Optional_payload_base<_Tp>::_M_reset() [with _Tp = std::unique_ptr<LineReader>]' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/optional:318:14,
    inlined from 'constexpr void std::_Optional_payload_base<_Tp>::_M_reset() [with _Tp = std::unique_ptr<LineReader>]' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/optional:315:7,
    inlined from 'constexpr std::_Optional_payload<_Tp, false, _Copy, _Move>::~_Optional_payload() [with _Tp = std::unique_ptr<LineReader>; bool _Copy = false; bool _Move = false]' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/optional:439:65,
    inlined from 'constexpr std::_Optional_base<std::unique_ptr<LineReader>, false, false>::~_Optional_base()' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/optional:510:12,
    inlined from 'constexpr std::optional<std::unique_ptr<LineReader> >::~optional()' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/optional:705:11,
    inlined from 'void collector(nix::Sync<State>&, std::condition_variable&)' at ../src/nix-eval-jobs.cc:277:5:
/nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/bits/unique_ptr.h:99:9: warning: '*(LineReader**)((char*)&fromReader_ + offsetof(std::optional<std::unique_ptr<LineReader, std::default_delete<LineReader> > >,std::optional<std::unique_ptr<LineReader, std::default_delete<LineReader> > >::<unnamed>.std::_Optional_base<std::unique_ptr<LineReader, std::default_delete<LineReader> >, false, false>::<unnamed>))' may be used uninitialized [-Wmaybe-uninitialized]
   99 |         delete __ptr;
      |         ^~~~~~~~~~~~
../src/nix-eval-jobs.cc: In function 'void collector(nix::Sync<State>&, std::condition_variable&)':
../src/nix-eval-jobs.cc:177:52: note: '*(LineReader**)((char*)&fromReader_ + offsetof(std::optional<std::unique_ptr<LineReader, std::default_delete<LineReader> > >,std::optional<std::unique_ptr<LineReader, std::default_delete<LineReader> > >::<unnamed>.std::_Optional_base<std::unique_ptr<LineReader, std::default_delete<LineReader> >, false, false>::<unnamed>))' was declared here
  177 |         std::optional<std::unique_ptr<LineReader>> fromReader_;
      |                                                    ^~~~~~~~~~~
[6/6] g++  -o src/nix-eval-jobs src/nix-eval-jobs.p/nix-eval-jobs.cc.o src/nix-eval-jobs.p/eval-args.cc.o src/nix-eval-jobs.p/drv.cc.o src/nix-eval-jobs.p/buffered-io.cc.o src/nix-eval-jobs.p/worker.cc.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group /nix/store/mslna7y4dcgx4gflxzrmb5iaxvd8aqv5-nix-2.18.3-lixpre20240415-866c76c/lib/libnixmain.so /nix/store/mslna7y4dcgx4gflxzrmb5iaxvd8aqv5-nix-2.18.3-lixpre20240415-866c76c/lib/libnixstore.so /nix/store/mslna7y4dcgx4gflxzrmb5iaxvd8aqv5-nix-2.18.3-lixpre20240415-866c76c/lib/libnixutil.so /nix/store/mslna7y4dcgx4gflxzrmb5iaxvd8aqv5-nix-2.18.3-lixpre20240415-866c76c/lib/libnixexpr.so /nix/store/5x8rvqskrmh94fkrxsr2nsin6v7pr43m-boehm-gc-8.2.4/lib/libgc.so -lpthread -ldl /nix/store/mslna7y4dcgx4gflxzrmb5iaxvd8aqv5-nix-2.18.3-lixpre20240415-866c76c/lib/libnixcmd.so -Wl,--end-group -pthread
@nix { "action": "setPhase", "phase": "installPhase" }
Running phase: installPhase
mesonInstallPhase flags: ''
Installing src/nix-eval-jobs to /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/bin
@nix { "action": "setPhase", "phase": "fixupPhase" }
Running phase: fixupPhase
shrinking RPATHs of ELF executables and libraries in /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4
shrinking /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/bin/nix-eval-jobs
checking for references to /build/ in /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4...
patching script interpreter paths in /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4
stripping (with command strip and flags -S -p) in  /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/bin

The use of unique_ptr here is honestly quite suspicious and we think it probably should be audited.

``` @nix { "action": "setPhase", "phase": "unpackPhase" } Running phase: unpackPhase unpacking source archive /nix/store/41sswc6mrl67i4ds6hsxdpyx9wy8xzpp-source source root is source @nix { "action": "setPhase", "phase": "patchPhase" } Running phase: patchPhase @nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" } Running phase: updateAutotoolsGnuConfigScriptsPhase @nix { "action": "setPhase", "phase": "configurePhase" } Running phase: configurePhase mesonConfigurePhase flags: --prefix=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4 --libdir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/lib --libexecdir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/libexec --bindir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/bin --sbindir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/sbin --includedir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/include --mandir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/share/man --infodir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/share/info --localedir=/nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/share/locale -Dauto_features=enabled -Dwrap_mode=nodownload --buildtype=debugoptimized The Meson build system Version: 1.3.2 Source dir: /build/source Build dir: /build/source/build Build type: native build Project name: nix-eval-jobs Project version: 0.1.6 C++ compiler for the host machine: g++ (gcc 13.2.0 "g++ (GCC) 13.2.0") C++ linker for the host machine: g++ ld.bfd 2.40 Host machine cpu family: x86_64 Host machine cpu: x86_64 Found pkg-config: YES (/nix/store/492n7ylp2f9zn0k3vghv1snypgkzznc5-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2 Run-time dependency nix-main found: YES 2.90.0-lixpre20240415-866c76c Run-time dependency nix-store found: YES 2.90.0-lixpre20240415-866c76c Run-time dependency nix-expr found: YES 2.90.0-lixpre20240415-866c76c Run-time dependency nix-cmd found: YES 2.90.0-lixpre20240415-866c76c Run-time dependency threads found: YES Run-time dependency nlohmann_json found: YES 3.11.3 Run-time dependency Boost found: YES 1.81.0 (/nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev) Checking whether type "struct dirent" has member "d_type" : YES Configuring autotools-config.h using configuration Build targets in project: 1 nix-eval-jobs 0.1.6 User defined options auto_features: enabled bindir : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/bin buildtype : debugoptimized includedir : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/include infodir : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/share/info libdir : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/lib libexecdir : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/libexec localedir : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/share/locale mandir : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/share/man prefix : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4 sbindir : /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/sbin wrap_mode : nodownload Found ninja-1.11.1 at /nix/store/3dj1s1bhxanq3f0nffwf786l71g1lcn6-ninja-1.11.1/bin/ninja mesonConfigurePhase: enabled\ parallel\ building @nix { "action": "setPhase", "phase": "buildPhase" } Running phase: buildPhase build flags: -j24 -v [1/6] g++ -Isrc/nix-eval-jobs.p -Isrc -I../src -I/nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix -I/nix/store/bb7nl1a8vva0svj1lka0fxr761cykd6h-boehm-gc-8.2.4-dev/include -I/nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev/include -I/nix/store/9q78dj4vk17hmd19pzx8kqh18f2vvsl9-nlohmann_json-3.11.3/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -pthread -DBOOST_ALL_NO_LIB -std=c++2a -std=c++2a -std=c++2a -std=c++2a -std=c++2a -fvisibility=hidden --include autotools-config.h -MD -MQ src/nix-eval-jobs.p/buffered-io.cc.o -MF src/nix-eval-jobs.p/buffered-io.cc.o.d -o src/nix-eval-jobs.p/buffered-io.cc.o -c ../src/buffered-io.cc [2/6] g++ -Isrc/nix-eval-jobs.p -Isrc -I../src -I/nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix -I/nix/store/bb7nl1a8vva0svj1lka0fxr761cykd6h-boehm-gc-8.2.4-dev/include -I/nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev/include -I/nix/store/9q78dj4vk17hmd19pzx8kqh18f2vvsl9-nlohmann_json-3.11.3/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -pthread -DBOOST_ALL_NO_LIB -std=c++2a -std=c++2a -std=c++2a -std=c++2a -std=c++2a -fvisibility=hidden --include autotools-config.h -MD -MQ src/nix-eval-jobs.p/eval-args.cc.o -MF src/nix-eval-jobs.p/eval-args.cc.o.d -o src/nix-eval-jobs.p/eval-args.cc.o -c ../src/eval-args.cc [3/6] g++ -Isrc/nix-eval-jobs.p -Isrc -I../src -I/nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix -I/nix/store/bb7nl1a8vva0svj1lka0fxr761cykd6h-boehm-gc-8.2.4-dev/include -I/nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev/include -I/nix/store/9q78dj4vk17hmd19pzx8kqh18f2vvsl9-nlohmann_json-3.11.3/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -pthread -DBOOST_ALL_NO_LIB -std=c++2a -std=c++2a -std=c++2a -std=c++2a -std=c++2a -fvisibility=hidden --include autotools-config.h -MD -MQ src/nix-eval-jobs.p/worker.cc.o -MF src/nix-eval-jobs.p/worker.cc.o.d -o src/nix-eval-jobs.p/worker.cc.o -c ../src/worker.cc [4/6] g++ -Isrc/nix-eval-jobs.p -Isrc -I../src -I/nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix -I/nix/store/bb7nl1a8vva0svj1lka0fxr761cykd6h-boehm-gc-8.2.4-dev/include -I/nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev/include -I/nix/store/9q78dj4vk17hmd19pzx8kqh18f2vvsl9-nlohmann_json-3.11.3/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -pthread -DBOOST_ALL_NO_LIB -std=c++2a -std=c++2a -std=c++2a -std=c++2a -std=c++2a -fvisibility=hidden --include autotools-config.h -MD -MQ src/nix-eval-jobs.p/drv.cc.o -MF src/nix-eval-jobs.p/drv.cc.o.d -o src/nix-eval-jobs.p/drv.cc.o -c ../src/drv.cc [5/6] g++ -Isrc/nix-eval-jobs.p -Isrc -I../src -I/nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix -I/nix/store/bb7nl1a8vva0svj1lka0fxr761cykd6h-boehm-gc-8.2.4-dev/include -I/nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev/include -I/nix/store/9q78dj4vk17hmd19pzx8kqh18f2vvsl9-nlohmann_json-3.11.3/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -pthread -DBOOST_ALL_NO_LIB -std=c++2a -std=c++2a -std=c++2a -std=c++2a -std=c++2a -fvisibility=hidden --include autotools-config.h -MD -MQ src/nix-eval-jobs.p/nix-eval-jobs.cc.o -MF src/nix-eval-jobs.p/nix-eval-jobs.cc.o.d -o src/nix-eval-jobs.p/nix-eval-jobs.cc.o -c ../src/nix-eval-jobs.cc In file included from /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/memory:78, from /nix/store/9q78dj4vk17hmd19pzx8kqh18f2vvsl9-nlohmann_json-3.11.3/include/nlohmann/json_fwd.hpp:14, from /nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix/config.hh:8, from /nix/store/w1c726g67dxnahcqmcfksbqlq8j86cc8-nix-2.18.3-lixpre20240415-866c76c-dev/include/nix/eval-settings.hh:3, from ../src/nix-eval-jobs.cc:3: In member function 'void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = LineReader]', inlined from 'void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = LineReader]' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/bits/unique_ptr.h:93:7, inlined from 'std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = LineReader; _Dp = std::default_delete<LineReader>]' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/bits/unique_ptr.h:404:17, inlined from 'constexpr void std::_Optional_payload_base<_Tp>::_M_destroy() [with _Tp = std::unique_ptr<LineReader>]' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/optional:287:35, inlined from 'constexpr void std::_Optional_payload_base<_Tp>::_M_reset() [with _Tp = std::unique_ptr<LineReader>]' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/optional:318:14, inlined from 'constexpr void std::_Optional_payload_base<_Tp>::_M_reset() [with _Tp = std::unique_ptr<LineReader>]' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/optional:315:7, inlined from 'constexpr std::_Optional_payload<_Tp, false, _Copy, _Move>::~_Optional_payload() [with _Tp = std::unique_ptr<LineReader>; bool _Copy = false; bool _Move = false]' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/optional:439:65, inlined from 'constexpr std::_Optional_base<std::unique_ptr<LineReader>, false, false>::~_Optional_base()' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/optional:510:12, inlined from 'constexpr std::optional<std::unique_ptr<LineReader> >::~optional()' at /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/optional:705:11, inlined from 'void collector(nix::Sync<State>&, std::condition_variable&)' at ../src/nix-eval-jobs.cc:277:5: /nix/store/cmr8qd8w64w8q0cbfc30p98z2pydc1k7-gcc-13.2.0/include/c++/13.2.0/bits/unique_ptr.h:99:9: warning: '*(LineReader**)((char*)&fromReader_ + offsetof(std::optional<std::unique_ptr<LineReader, std::default_delete<LineReader> > >,std::optional<std::unique_ptr<LineReader, std::default_delete<LineReader> > >::<unnamed>.std::_Optional_base<std::unique_ptr<LineReader, std::default_delete<LineReader> >, false, false>::<unnamed>))' may be used uninitialized [-Wmaybe-uninitialized] 99 | delete __ptr; | ^~~~~~~~~~~~ ../src/nix-eval-jobs.cc: In function 'void collector(nix::Sync<State>&, std::condition_variable&)': ../src/nix-eval-jobs.cc:177:52: note: '*(LineReader**)((char*)&fromReader_ + offsetof(std::optional<std::unique_ptr<LineReader, std::default_delete<LineReader> > >,std::optional<std::unique_ptr<LineReader, std::default_delete<LineReader> > >::<unnamed>.std::_Optional_base<std::unique_ptr<LineReader, std::default_delete<LineReader> >, false, false>::<unnamed>))' was declared here 177 | std::optional<std::unique_ptr<LineReader>> fromReader_; | ^~~~~~~~~~~ [6/6] g++ -o src/nix-eval-jobs src/nix-eval-jobs.p/nix-eval-jobs.cc.o src/nix-eval-jobs.p/eval-args.cc.o src/nix-eval-jobs.p/drv.cc.o src/nix-eval-jobs.p/buffered-io.cc.o src/nix-eval-jobs.p/worker.cc.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group /nix/store/mslna7y4dcgx4gflxzrmb5iaxvd8aqv5-nix-2.18.3-lixpre20240415-866c76c/lib/libnixmain.so /nix/store/mslna7y4dcgx4gflxzrmb5iaxvd8aqv5-nix-2.18.3-lixpre20240415-866c76c/lib/libnixstore.so /nix/store/mslna7y4dcgx4gflxzrmb5iaxvd8aqv5-nix-2.18.3-lixpre20240415-866c76c/lib/libnixutil.so /nix/store/mslna7y4dcgx4gflxzrmb5iaxvd8aqv5-nix-2.18.3-lixpre20240415-866c76c/lib/libnixexpr.so /nix/store/5x8rvqskrmh94fkrxsr2nsin6v7pr43m-boehm-gc-8.2.4/lib/libgc.so -lpthread -ldl /nix/store/mslna7y4dcgx4gflxzrmb5iaxvd8aqv5-nix-2.18.3-lixpre20240415-866c76c/lib/libnixcmd.so -Wl,--end-group -pthread @nix { "action": "setPhase", "phase": "installPhase" } Running phase: installPhase mesonInstallPhase flags: '' Installing src/nix-eval-jobs to /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/bin @nix { "action": "setPhase", "phase": "fixupPhase" } Running phase: fixupPhase shrinking RPATHs of ELF executables and libraries in /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4 shrinking /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/bin/nix-eval-jobs checking for references to /build/ in /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4... patching script interpreter paths in /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4 stripping (with command strip and flags -S -p) in /nix/store/0rdbgj5ixpqvj7ivcmby9habck83r8h7-nix-eval-jobs-2.19.4/bin ``` The use of unique_ptr here is honestly quite suspicious and we think it probably should be audited.
Member

s/unused/uninitalized/?

`s/unused/uninitalized/`?
jade changed title from Compiler warning about unused variables to Compiler warning about uninitialized variables 2024-04-17 20:36:22 +00:00
lunaphied added the
Kind/Bug
Reviewed
Confirmed
Priority
Low
labels 2024-04-29 00:45:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/nix-eval-jobs#1
No description provided.