Bad executable

gmail Vladimir Koković vladimir.kokovic@gmail.com
Thu Jun 24 11:05:12 GMT 2021


The NetBeans project contains all the elements of the build as well as 
compiler options.

To be clearer, here is output from the build:

cd '/asoft-src/ispp-64/linux/vk-trace'
/usr/bin/make -f Makefile CONF=Debug clean
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= 
.clean-conf
make[1]: Entering directory '/asoft-src/ispp-64/linux/vk-trace'
rm -f -r build/Debug
make[1]: Leaving directory '/asoft-src/ispp-64/linux/vk-trace'
CLEAN SUCCESSFUL (total time: 104ms)
cd '/asoft-src/ispp-64/linux/vk-trace'
/usr/bin/make -f Makefile CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= 
.build-conf
make[1]: Entering directory '/asoft-src/ispp-64/linux/vk-trace'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk 
dist/Debug/GNU-Linux/vk-trace
make[2]: Entering directory '/asoft-src/ispp-64/linux/vk-trace'
mkdir -p build/Debug/GNU-Linux/_ext/5fd253b2
rm -f "build/Debug/GNU-Linux/_ext/5fd253b2/main.o.d"
gcc -ggdb3 -Og -gdwarf-2 -finstrument-functions -fPIC -save-temps   -c 
-g -Werror -D_GNU_SOURCE -MMD -MP -MF 
"build/Debug/GNU-Linux/_ext/5fd253b2/main.o.d" -o 
build/Debug/GNU-Linux/_ext/5fd253b2/main.o 
/asoft-src/ispp-64/linux/vk-trace/main.c
mkdir -p build/Debug/GNU-Linux/_ext/5fd253b2
rm -f "build/Debug/GNU-Linux/_ext/5fd253b2/vk-trace-unix.o.d"
gcc -ggdb3 -Og -gdwarf-2 -finstrument-functions -fPIC -save-temps   -c 
-g -Werror -D_GNU_SOURCE -MMD -MP -MF 
"build/Debug/GNU-Linux/_ext/5fd253b2/vk-trace-unix.o.d" -o 
build/Debug/GNU-Linux/_ext/5fd253b2/vk-trace-unix.o 
/asoft-src/ispp-64/linux/vk-trace/vk-trace-unix.c
mkdir -p dist/Debug/GNU-Linux
gcc -ggdb3 -Og -gdwarf-2 -finstrument-functions -fPIC -save-temps    -o 
dist/Debug/GNU-Linux/vk-trace build/Debug/GNU-Linux/_ext/5fd253b2/main.o 
build/Debug/GNU-Linux/_ext/5fd253b2/vk-trace-unix.o -shared -ludis86 
-ldl -Wl,-Map,/tmp/vk-trace.map
make[2]: Leaving directory '/asoft-src/ispp-64/linux/vk-trace'
make[1]: Leaving directory '/asoft-src/ispp-64/linux/vk-trace'
BUILD SUCCESSFUL (total time: 553ms)


[root@vlada-kuci tmp 13:00:34]$ 
/asoft-src/ispp-64/linux/vk-trace/dist/Debug/GNU-Linux/vk-trace
Segmentation fault (core dumped)
[root@vlada-kuci tmp 13:00:38]$


[root@vlada-kuci tmp 13:00:38]$ coredumpctl debug
            PID: 1254125 (vk-trace)
            UID: 0 (root)
            GID: 0 (root)
         Signal: 11 (SEGV)
      Timestamp: Thu 2021-06-24 13:00:38 CEST (1min 14s ago)
   Command Line: 
/asoft-src/ispp-64/linux/vk-trace/dist/Debug/GNU-Linux/vk-trace
     Executable: 
/asoft-src/ispp-64/linux/vk-trace/dist/Debug/GNU-Linux/vk-trace
  Control Group: 
/user.slice/user-0.slice/user@0.service/app.slice/app-org.kde.konsole-76c21b455646434185ef1b6624a919b8.scope
           Unit: user@0.service
      User Unit: app-org.kde.konsole-76c21b455646434185ef1b6624a919b8.scope
          Slice: user-0.slice
      Owner UID: 0 (root)
        Boot ID: 3844df00b5fb41bca52f50121ca9d8cf
     Machine ID: 27bff91dbe26453e8890335069c7071a
       Hostname: vlada-kuci
        Storage: 
/var/lib/systemd/coredump/core.vk-trace.0.3844df00b5fb41bca52f50121ca9d8cf.1254125.1624532438000000.zst 
(present)
      Disk Size: 5.8K
        Message: Process 1254125 (vk-trace) of user 0 dumped core.

                 Stack trace of thread 1254125:
                 #0  0x0000000000000001 n/a (n/a + 0x0)

GNU gdb (GDB) 10.2
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
vk qt5printers
vk wx5printers
vk libpython
sys.version_info(major=3, minor=9, micro=5, releaselevel='final', serial=0)
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) 
[answered N; input not from terminal]
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) 
[answered N; input not from terminal]
Reading symbols from 
/asoft-src/ispp-64/linux/vk-trace/dist/Debug/GNU-Linux/vk-trace...
[New LWP 1254125]
Core was generated by 
`/asoft-src/ispp-64/linux/vk-trace/dist/Debug/GNU-Linux/vk-trace'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000000001 in ?? ()
(gdb)

On 24.6.21. 11:06, Jonathan Wakely wrote:
> On Thu, 24 Jun 2021 at 07:34, gmail Vladimir Koković via Gcc-help
> <gcc-help@gcc.gnu.org> wrote:
>>
>> I'm not sure if this is a GCC bug so I'm looking for help.
>>
>> Namely, although everything is regular when it comes to .C programs, the
>> result is defective executable.
> Defective how? You haven't even told us what the error is.
>
> As it says at https://gcc.gnu.org/bugs/
>
> "Before reporting that GCC compiles your code incorrectly, compile it
> with gcc -Wall -Wextra and see whether this shows anything wrong with
> your code. Similarly, if compiling with -fno-strict-aliasing -fwrapv
> -fno-aggressive-loop-optimizations makes a difference, or if compiling
> with -fsanitize=undefined produces any run-time errors, then your code
> is probably not correct. "
>
> Have you tried those options?


More information about the Gcc-help mailing list