Cross-compiled application running on target gets killed and shows "Illegal Instruction".
-
@jsulm I apologise for the delay in replying.
I hope this is what you asked for.
Executable :webpage: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
Librarires :
libQtCore.so.4.8.6: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), stripped libQtWebKit.so.4.10.4: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped libQtNetwork.so.4.8.6: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped libQtGui.so.4.8.6: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped libsqlite3.so.0.8.6: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped libjpeg.so.9.2.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped libxml2.so.2.9.4: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped libpng12.so.0.57.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped libxslt.so.1.1.29: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped
-
@jsulm I used strace and this is where webpage is getting killed.
--- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x46f2e500} --- rt_sigaction(SIGILL, {sa_handler=SIG_DFL, sa_mask=[ILL], sa_flags=SA_RESTORER|SA_RESTART, sa_resto0 semctl(425985, 0, IPC_64|IPC_RMID, NULL) = 0 ioctl(11, KDSKBMODE, 0x2) = 0 ioctl(11, SNDCTL_TMR_START or TCSETS, {B38400 -opost -isig -icanon -echo ...}) = 0 ioctl(11, TCGETS, {B38400 -opost -isig -icanon -echo ...}) = 0 close(11) = 0 ioctl(9, KDSETMODE, 0x1) = 0 write(9, "\33[9;15]\33[?33h\33[?25h\33[?0c\0", 25) = 25 close(9) = 0 tgkill(1694, 1694, SIGILL) = 0 sigreturn({mask=[]}) = 1182397424 --- SIGILL {si_signo=SIGILL, si_code=SI_TKILL, si_pid=1694, si_uid=0} --- +++ killed by SIGILL +++ Illegal instruction
Updation :
webpage is a widget which displays google.com. The widget opens up and google.com front page gets loaded. When i enter something in the search box and press enter, the widget is killed with "Illegal instruction". -
@jsulm GDB
Starting program: /usr/bin/webpage -qws (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread 0x40109000 (LWP 2281)] Program received signal SIGILL, Illegal instruction. [Switching to Thread 0x40109000 (LWP 2281)] 0x444924a0 in ?? ()
-
@jsulm said in Cross-compiled application running on target gets killed and shows "Illegal Instruction".:
@name_qt Can you try with a debug build?
Also, after it crashed you can get backtrace with bt in GDB.0x00007fe64971e9d0 in real_push_to_main_loop (
callback=0x7fe64a436e30 <call_mWidgets_loop>, data=0)
at /src/Modules/QT5/src/widgets.cxx:395
395 callback(data);
Missing separate debuginfos, use: zypper install Mesa-dri-debuginfo-24.1.3-390.1.x86_64 Mesa-libEGL1-debuginfo-24.1.3-390.1.x86_64 Mesa-libglapi0-debuginfo-24.1.3-390.1.x86_64 libLLVM18-debuginfo-18.1.8-2.1.x86_64 libQt5Core5-debuginfo-5.15.15+kde127-1.1.x86_64 libQt5DBus5-debuginfo-5.15.15+kde127-1.1.x86_64 libQt5Gui5-debuginfo-5.15.15+kde127-1.1.x86_64 libQt5WaylandClient5-debuginfo-5.15.15+kde59-1.1.x86_64 libQt5Widgets5-debuginfo-5.15.15+kde127-1.1.x86_64 libSDL2-2_0-0-debuginfo-2.30.7-1.1.x86_64 libSDL2_image-2_0-0-debuginfo-2.8.2-1.3.x86_64 libX11-6-debuginfo-1.8.10-1.1.x86_64 libX11-xcb1-debuginfo-1.8.10-1.1.x86_64 libXau6-debuginfo-1.0.11-1.5.x86_64 libasound2-debuginfo-1.2.12-1.1.x86_64 libbrotlicommon1-debuginfo-1.1.0-1.3.x86_64 libbrotlidec1-debuginfo-1.1.0-1.3.x86_64 libbz2-1-debuginfo-1.0.8-5.10.x86_64 libcap2-debuginfo-2.70-1.1.x86_64 libdbus-1-3-debuginfo-1.14.10-3.1.x86_64 libdrm2-debuginfo-2.4.123-1.1.x86_64 libdrm_amdgpu1-debuginfo-2.4.123-1.1.x86_64 libdrm_intel1-debuginfo-2.4.123-1.1.x86_64 libdrm_radeon1-debuginfo-2.4.123-1.1.x86_64 libedit0-debuginfo-20210910.3.1-2.7.x86_64 libelf1-debuginfo-0.191-2.1.x86_64 libexpat1-debuginfo-2.6.2-1.1.x86_64 libexslt0-debuginfo-1.1.39-3.1.x86_64 libffi8-debuginfo-3.4.6-1.1.x86_64 libfontconfig1-debuginfo-2.15.0-2.1.x86_64 libfreetype6-debuginfo-2.13.2-2.2.x86_64 libgcc_s1-debuginfo-14.2.0+git10526-2.1.x86_64 libgcrypt20-debuginfo-1.11.0-1.1.x86_64 libglib-2_0-0-debuginfo-2.80.5-2.1.x86_64 libgpg-error0-debuginfo-1.50-1.1.x86_64 libharfbuzz0-debuginfo-9.0.0-1.1.x86_64 libicu75-debuginfo-75.1-1.1.x86_64 libjbig2-debuginfo-2.1-5.3.x86_64 libjitterentropy3-debuginfo-3.4.1-4.2.x86_64 libjpeg8-debuginfo-8.3.2-80.1.x86_64 liblzma5-debuginfo-5.6.2-1.1.x86_64 libpciaccess0-debuginfo-0.18.1-1.2.x86_64 libpcre2-16-0-debuginfo-10.44-1.1.x86_64 libpcre2-8-0-debuginfo-10.44-1.1.x86_64 libpng16-16-debuginfo-1.6.43-3.1.x86_64 libqt5-qtwayland-debuginfo-5.15.15+kde59-1.1.x86_64 libsharpyuv0-debuginfo-1.4.0-1.1.x86_64 libstdc++6-debuginfo-14.2.0+git10526-2.1.x86_64 libsystemd0-debuginfo-256.5-1.1.x86_64 libtiff6-debuginfo-4.6.0-5.1.x86_64 libvulkan1-debuginfo-1.3.290-1.1.x86_64 libwayland-client0-debuginfo-1.23.0-1.1.x86_64 libwayland-egl1-debuginfo-1.23.0-1.1.x86_64 libwayland-server0-debuginfo-1.23.0-1.1.x86_64 libwebp7-debuginfo-1.4.0-1.1.x86_64 libwebpdemux2-debuginfo-1.4.0-1.1.x86_64 libxcb-dri2-0-debuginfo-1.17.0-1.1.x86_64 libxcb-xfixes0-debuginfo-1.17.0-1.1.x86_64 libxcb1-debuginfo-1.17.0-1.1.x86_64 libxml2-2-debuginfo-2.12.9-1.1.x86_64 libzstd1-debuginfo-1.5.6-1.1.x86_64
(gdb) backtrace
#0 0x00007fe64971e9d0 in real_push_to_main_loop (
callback=0x7fe64a436e30 <call_mWidgets_loop>, data=0)
at /src/Modules/QT5/src/widgets.cxx:395
#1 0x00007fe64a4379ee in handle_events (level=0xd027e0) at loop.c:323
#2 0x0000000000400c73 in main (argc=1, argv=0x7ffcc9fd8a68) at główny.c:69 -
@nintyfan19 It would be helpful if you would provide some context, not just stack trace...
-
Found an description of my problem:
https://stackoverflow.com/questions/77600344/sigill-illegal-instruction-when-running-eventfilter-in-qt-application-using-ne
It seems to works, but I do not known if I remove each no return statement in function with type error. -
@nintyfan19 said in Cross-compiled application running on target gets killed and shows "Illegal Instruction".:
I do not known if I remove each no return statement in function with type error
I don't know what you mean here
-
@jsulm said in Cross-compiled application running on target gets killed and shows "Illegal Instruction".:
@nintyfan19 said in Cross-compiled application running on target gets killed and shows "Illegal Instruction".:
I do not known if I remove each no return statement in function with type error
I don't know what you mean here
I mean problem was newer gcc-c++ generates bad instruction to wipe program, when function declared with type return nothing. That was my problem. I do not known If I correct each function in my code. Everything seems to work.
-
Hi,
If you are not returning anything from a function that has a return type then you enter undefined behaviour territory. You were just lucky it worked until now.
This also means that you ignored your compiler warnings which is usually the best way to have strange things such as this crash happening.