segmentation-fault

Xcode 11.4 - Archiving project - Segmentation Fault 11

一世执手 提交于 2020-05-10 04:12:12
问题 I Just updated Xcode to 11.4 and when archiving a project it shows me 'Segmentation Fault 11' This project would archive with Xcode 11.3.1 but now it doesn't.. Anyone else ran into the same issue? Edit: April 15th 2020 Apple just released Xcode 11.4.1 回答1: I have run into the same issue. Archiving uses the Release building configuration so I went through every compiler setting to work out which of the differences lead to these Segmentation faults. In my case the problem disappears when I

C++ Segmentation Fault when using cout in static variable initialization

雨燕双飞 提交于 2020-04-09 06:49:28
问题 I have a program where I use cout to emit debug information. The code is executed in the initialization of a static global variable, i.e. quite early in the program execution. When I use my own build script to build the program, it segfaults at the first use of cout (only a string literal is shifted into cout, so it cannot be the value). I used valgrind to check for earlier writes to invalid locations, but there are none (and there is also no code that would be likely to generate those writes

C++ Segmentation Fault when using cout in static variable initialization

怎甘沉沦 提交于 2020-04-09 06:48:13
问题 I have a program where I use cout to emit debug information. The code is executed in the initialization of a static global variable, i.e. quite early in the program execution. When I use my own build script to build the program, it segfaults at the first use of cout (only a string literal is shifted into cout, so it cannot be the value). I used valgrind to check for earlier writes to invalid locations, but there are none (and there is also no code that would be likely to generate those writes

C++ Segmentation Fault when using cout in static variable initialization

老子叫甜甜 提交于 2020-04-09 06:47:53
问题 I have a program where I use cout to emit debug information. The code is executed in the initialization of a static global variable, i.e. quite early in the program execution. When I use my own build script to build the program, it segfaults at the first use of cout (only a string literal is shifted into cout, so it cannot be the value). I used valgrind to check for earlier writes to invalid locations, but there are none (and there is also no code that would be likely to generate those writes

C++ Segmentation Fault when using cout in static variable initialization

﹥>﹥吖頭↗ 提交于 2020-04-09 06:44:45
问题 I have a program where I use cout to emit debug information. The code is executed in the initialization of a static global variable, i.e. quite early in the program execution. When I use my own build script to build the program, it segfaults at the first use of cout (only a string literal is shifted into cout, so it cannot be the value). I used valgrind to check for earlier writes to invalid locations, but there are none (and there is also no code that would be likely to generate those writes

How can I correctly set all elements of an array to a negative value?

对着背影说爱祢 提交于 2020-04-07 08:50:30
问题 I have a program where it asks the user to for a certain amount and elements and creates the array, and then after initializing all elements to zero, it now sets all elements to negative -1. I have a segmentation fault and I think it's due to my code for setting the elements to -1. What would be a better way for set all elements to negative one? And if possible, explain why. #include <cstddef> #include <iostream> using namespace std; int main(int argc, char * argv[]) { cout << endl << "A

Weird Native Crash - pid: 0, tid: 0 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)

▼魔方 西西 提交于 2020-03-18 03:29:18
问题 I am getting this weird crash on android *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** pid: 0, tid: 0 >>> com.oimvo.discdj <<< backtrace: #00 pc 000000000001d050 /data/app/com.oimvo.discdj-2/lib/arm64/libavfilter.7.11.101.so (av_fastresampler_resample_s16+1944) #01 pc 000000000001c930 /data/app/com.oimvo.discdj-2/lib/arm64/libavfilter.7.11.101.so (av_fastresampler_resample_s16+120) and another similar crash *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** pid:

Weird Native Crash - pid: 0, tid: 0 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)

ぐ巨炮叔叔 提交于 2020-03-18 03:29:08
问题 I am getting this weird crash on android *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** pid: 0, tid: 0 >>> com.oimvo.discdj <<< backtrace: #00 pc 000000000001d050 /data/app/com.oimvo.discdj-2/lib/arm64/libavfilter.7.11.101.so (av_fastresampler_resample_s16+1944) #01 pc 000000000001c930 /data/app/com.oimvo.discdj-2/lib/arm64/libavfilter.7.11.101.so (av_fastresampler_resample_s16+120) and another similar crash *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** pid:

Segfault with x86 assembly on mov 0, %eax

一笑奈何 提交于 2020-03-16 06:00:13
问题 I'm trying to assemble a small piece of x86 code. I'm on a 32 bit machine and I have written the following code. It should just add values into eax and then return. I realize there will not be any output. When I compile this using gcc main.S -o main It compiles with no errors. But when I run it seg faults (gdb claims that it segfaults on the first movl instruction). main.S has the following code in it. What am I doing wrong? .text .globl main main: pushl %ebp movl %esp, %ebp movl 0, %eax addl

segmentation fault(core dumped) error while using inline assembly

馋奶兔 提交于 2020-03-14 05:36:31
问题 I'm using inline assembly in GCC. I want to rotate a variable content 2 bits to the left (I moved the variable to the rax register and then rotate it 2 times). I wrote the code below but I faced segmentation fault(core dumped) error. I would be grateful if you could help me. uint64_t X = 13835058055282163712U; asm volatile( "movq %0 , %%rax\n" "rol %%rax\n" "rol %%rax\n" :"=r"(X) :"r"(X) ); printf("%" PRIu64 "\n" , X); 回答1: The key to understanding inline asm is to understand that each asm