shot icon indicating copy to clipboard operation
shot copied to clipboard

OpenBSD - Segmentation fault

Open Veraellyunjie opened this issue 3 years ago • 0 comments

/tmp> unzip shot-master.zip
Archive:  shot-master.zip
316b33dfb7ccac9a7889575deac9a9288c207a22
   creating: shot-master/
 extracting: shot-master/.gitignore
  inflating: shot-master/CMakeLists.txt
  inflating: shot-master/LICENSE.md
  inflating: shot-master/README.md
   creating: shot-master/cmake/
  inflating: shot-master/cmake/FindGDI32.c
  inflating: shot-master/cmake/FindGDI32.cmake
   creating: shot-master/docs/
  inflating: shot-master/docs/help.txt
  inflating: shot-master/docs/shot.1
   creating: shot-master/src/
 extracting: shot-master/src/.gitignore
  inflating: shot-master/src/bitmap.c
  inflating: shot-master/src/bitmap.h
  inflating: shot-master/src/bitmap_win.c
  inflating: shot-master/src/bitmap_x11.c
  inflating: shot-master/src/grab.h
  inflating: shot-master/src/grab_win.c
  inflating: shot-master/src/grab_x11.c
  inflating: shot-master/src/monitor.c
  inflating: shot-master/src/monitor.h
  inflating: shot-master/src/monitor_mgr.c
  inflating: shot-master/src/monitor_mgr.h
  inflating: shot-master/src/monitor_mgr_win.c
  inflating: shot-master/src/monitor_mgr_x11.c
  inflating: shot-master/src/region.h
   creating: shot-master/src/region_picker/
  inflating: shot-master/src/region_picker/active_monitor.c
  inflating: shot-master/src/region_picker/active_monitor.h
  inflating: shot-master/src/region_picker/active_window.h
  inflating: shot-master/src/region_picker/active_window_win.c
  inflating: shot-master/src/region_picker/active_window_x11.c
  inflating: shot-master/src/region_picker/errors.h
  inflating: shot-master/src/region_picker/interactive.h
  inflating: shot-master/src/region_picker/interactive_common.c
  inflating: shot-master/src/region_picker/interactive_common.h
  inflating: shot-master/src/region_picker/interactive_win.c
  inflating: shot-master/src/region_picker/interactive_x11.c
  inflating: shot-master/src/region_picker/monitor.c
  inflating: shot-master/src/region_picker/monitor.h
  inflating: shot-master/src/region_picker/string.c
  inflating: shot-master/src/region_picker/string.h
  inflating: shot-master/src/region_picker/window.h
  inflating: shot-master/src/region_picker/window_win.c
  inflating: shot-master/src/region_picker/window_x11.c
  inflating: shot-master/src/shot.c
/tmp> cd shot-master/
/tmp/shot-master> mkdir build && cd build
/tmp/shot-master/build> cmake ..
-- Found Git: /usr/local/bin/git (found version "2.35.1")
-- The C compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found ZLIB: /usr/lib/libz.so.6.0 (found version "1.2.11")
-- Found PNG: /usr/local/lib/libpng.so.18.0 (found version "1.6.37")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for modules 'x11;xrandr'
--   Found x11, version 1.7.3.1
--   Found xrandr, version 1.5.2
-- Performing Test WALL
-- Performing Test WALL - Success
-- Performing Test WEXTRA
-- Performing Test WEXTRA - Success
-- Performing Test PEDANTIC_ERRORS
-- Performing Test PEDANTIC_ERRORS - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/shot-master/build
/tmp/shot-master/build> make
[  6%] Building C object CMakeFiles/shot.dir/src/bitmap.c.o
[ 13%] Building C object CMakeFiles/shot.dir/src/bitmap_x11.c.o
/tmp/shot-master/src/bitmap_x11.c:4:42: warning: unused parameter 'bitmap' [-Wunused-parameter]
int bitmap_save_to_clipboard(ShotBitmap *bitmap)
                                         ^
1 warning generated.
[ 20%] Building C object CMakeFiles/shot.dir/src/grab_x11.c.o
[ 26%] Building C object CMakeFiles/shot.dir/src/monitor.c.o
[ 33%] Building C object CMakeFiles/shot.dir/src/monitor_mgr.c.o
[ 40%] Building C object CMakeFiles/shot.dir/src/monitor_mgr_x11.c.o
[ 46%] Building C object CMakeFiles/shot.dir/src/shot.c.o
[ 53%] Building C object CMakeFiles/shot.dir/src/region_picker/active_monitor.c.o
[ 60%] Building C object CMakeFiles/shot.dir/src/region_picker/active_window_x11.c.o
/tmp/shot-master/src/region_picker/active_window_x11.c:25:13: warning: variable 'window' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
        if (data)
            ^~~~
/tmp/shot-master/src/region_picker/active_window_x11.c:29:9: note: uninitialized use occurs here
    if (window == None)
        ^~~~~~
/tmp/shot-master/src/region_picker/active_window_x11.c:25:9: note: remove the 'if' if its condition is always true
        if (data)
        ^~~~~~~~~
/tmp/shot-master/src/region_picker/active_window_x11.c:14:18: note: initialize the variable 'window' to silence this warning
    Window window;
                 ^
                  = 0
1 warning generated.
[ 66%] Building C object CMakeFiles/shot.dir/src/region_picker/interactive_x11.c.o
[ 73%] Building C object CMakeFiles/shot.dir/src/region_picker/interactive_common.c.o
[ 80%] Building C object CMakeFiles/shot.dir/src/region_picker/monitor.c.o
[ 86%] Building C object CMakeFiles/shot.dir/src/region_picker/string.c.o
[ 93%] Building C object CMakeFiles/shot.dir/src/region_picker/window_x11.c.o
[100%] Linking C executable shot
[100%] Built target shot
/tmp/shot-master/build> ./shot --help
fish: Job 1, './shot --help' terminated by signal SIGSEGV (Address boundary error)
/tmp/shot-master/build> ./shot
fish: Job 1, './shot' terminated by signal SIGSEGV (Address boundary error)

Veraellyunjie avatar Sep 28 '22 01:09 Veraellyunjie