Questions tagged [illegal-instruction]

58 questions
2
votes
1 answer

Program SGILL's when linking OpenCV

I know this question is similar to may other ones but none of them seem to solve my problem. Symptoms Trivially build and run gdb_test with gdb. Program SIGILL's: ~/projects/gdb_test/build> gdb gdb_test GNU gdb (GDB; openSUSE…
2
votes
4 answers

Qbasic : illegal file number in *line number*

I'm writing a program in GW-BASIC. For some reasons, I have the following error : "Numéro de fichier illégal en 4712" which can be translated in english by, " illegal file number in 4712" Here is a part of my code : 51 Chemin$ =…
manny-
  • 129
  • 2
  • 10
2
votes
1 answer

Illegal instruction: 4 on MacOS High Sierra

I am trying to make a chat-looking window in pygame 3.6, I just updated my MacBook to version 10.13.6, before I did this it worked perfectly but after I get the message: Illegal instruction: 4. Code import pygame from pygame.locals import…
Luc Angevare
  • 25
  • 4
  • 17
2
votes
1 answer

System claims AVX2 is supported, but broadcasts of integer registers are unimplemented

cat /proc/cpuinfo reports that the avx2 flag is set. However, the AVX2 instruction vpbroadcastb causes an illegal instruction exception when ran. I am using x86_64 Linux and nasm as my assembler. On my system, reproducing this is as simple…
moonheart08
  • 115
  • 1
  • 9
2
votes
1 answer

Illegal hardware instruction when trying to import tensorflow

I just installed tensorflow using the instructions for the virtualenv method. The installation process went smoothly, so I don't think there was any problem there. After installation I proceeded to try and import it to validate that everything is…
inblank
  • 396
  • 1
  • 8
  • 26
2
votes
2 answers

Simplest way to get an illegal instruction exception

I am trying to create a program which generates an illegal instruction exception for demonstration purposes. There seems to be a simple solution to my problem: cmpxchgl %edx, %ecx But rather than giving me an exception at runtime, the compiler…
Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
1
vote
0 answers

Illegal instruction while unwinding stack on cross-compiled ARMv7 application

When trying to terminate (SIGINT) our cross-compiled application running on a dual ARM Cortex-A9, we segfault on an illegal instruction in the stack unwinding. In file ../libgcc/config/arm/unwind-arm.c: /* ABI defined function to pop registers off…
Lasse A Karlsen
  • 801
  • 5
  • 14
  • 23
1
vote
0 answers

Illegal Instruction Debugging (RISC-V core)

I am testing a program on a RISC-V core in baremetal. I am using no FPGA but running it in QuestaSim (RTL simulation). The program consists of the main launching a function. The problem is that when the function is supposed to return to main, an…
gb95
  • 11
  • 2
1
vote
1 answer

What happens to a program that contains certain instructions that are not supported by the cpu in question?

Say for example in the case of x86-64 you have a program that makes use of avx-512 instructions or any other special purpose instruction, and the cpu in question does not support the instruction at the low level such as a haswell based cpu, how does…
Deank
  • 13
  • 2
1
vote
0 answers

Tool to check illegal instruction in an executable in Linux

I have an application written in C/C++ and compiled with gcc/g++ with option -march=... in order to run on specific machine hardware. After compiling, i copy that executable to the destination machine. However, to make sure that it will run fine on…
khanhnd
  • 31
  • 6
1
vote
1 answer

Illegal instruction 4 when placing a function outside int main

I've just begun learning the C language and I ran into an issue with one of my programs. I am getting an error: "Illegal instruction 4" when executing: ./dictionary large.txt Large.txt is a file with 143091 alphabetically sorted words, with each…
KLM54W
  • 11
  • 2
1
vote
1 answer

Understand and troubleshoot SIGILL

I have built a copy of rocksdb for erlang (gitlab.com/Vagabond1/erlang-rocksdb@8708fe8) for a armv7 based target. It's a iMX6 SoloX processor, here's the cpuinfo: processor : 0 model name : ARMv7 Processor rev 10 (v7l) BogoMIPS :…
Benoit Duffez
  • 11,839
  • 12
  • 77
  • 125
1
vote
1 answer

Why do I get "Illegal Instruction" error when Building on windows10 and running on Windows7

I have a c++ program built using VS2017 on windows7. When I run it on Windows7 or windows10 there is no problem. If I Build the same program on Windows10 (still using VS2017) the program runs OK on Windows10 but when I try to run it on Windows7 I…
1
vote
1 answer

why lambda crash on clang but not gcc?

this program crash with clang #include #include #include #include int main(int argc, char **argv) { auto m = std::function( [](){ int r = std::rand() % 100; if (r < 50) …
Arnold
  • 23
  • 3
1
vote
2 answers

write a byte at address in .data segment in RISC-V assembly

I am writing a RISC-V assembly program that need to store a word (saved into a register) into a .data segment: .section .rodata msg: .string "Hello World\n" .section .data num: .word 97 .section .text .global _start _start: li a1,…