AddressSanitizer, What do these terms mean?
So I'm using the AddressSanitizer. But it uses some dense terms when describing the problem.Shadow bytes around the buggy address: 0x0c067fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00...
View ArticleRandom digits printed when printing more than 6 decimal digits in float...
I was executing following C code-float a=3.25678932; printf("%0.10f\n",a); The above printf() statement giving following output:3.2567892075 I am not able to understand how other four digits('2075')...
View Articlecentos ./configure error: libevent not found despite it is installed via yum
I have a really strange problem. I am trying to compile a source (telegram-cli) which has dependency on openssl, libevent and other libraries.The system is centos 6.9 and "Development Tools" and...
View ArticleVectorizing with unaligned buffers: using VMASKMOVPS: generating a mask from...
gcc 5.3 with -O3 -mavx -mtune=haswell for x86-64 makes surprisingly bulky code to handle potentially-misaligned inputs for code like:// convenient simple example of compiler input // I'm not actually...
View Articlecollect2: ld returned 1 exit status make[2]: * [../../../bin/loginserver]...
Can anyone assist me with this? pretty new to this so i know little to nothing. im trying to compile a source code for old mmorpgmake -C loginserver make[2]: Entering directory...
View ArticleMeanings of some CFLAGS [closed]
I found some strange CFLAGS in makefile, that I never used before, and even I can't google them. Please, someone know their meanings? -Wpointer-arith -Waggregate-return -Winline -Wunreachable-code...
View ArticleEigen, parallel ConjugateGradient failed: More threads, more costs
I want to use a parallel ConjugateGradient in Eigen 3.3.7 (gitlab) to solve Ax=b, but it showed that more threads, more computational costs. I test the code in this question and change the matrix...
View ArticleCan't compile a C program on a Mac after upgrading to Catalina 10.15
There's a previous question Can't compile C program on a Mac after upgrade to Mojave, and the answers to that have covered most of the variations on what goes wrong.Now — as of Monday 2019-10-07 — you...
View ArticleHow can I use "sizeof" in a preprocessor macro?
Is there any way to use a sizeof in a preprocessor macro?For example, there have been a ton of situations over the years in which I wanted to do something like:#if sizeof(someThing) != PAGE_SIZE #error...
View ArticleLinking a program to libraries the use different _GLIBCXX_USE_CXX11_ABI each
I am trying to compile a program (using GCC 5.4.O) that depends on two libraries. Library A was compiled using the old ABI, while library B was compiled using the new C++11 ABI (see Dual ABI).If...
View ArticleGCC: why global variable missing in dynamic symbol table?
Code://test.c #include <stdio.h> int v_flag = 0xCACA; void main(int argc, char* argv[]){ printf("v_flag = %d, &v_flag=%p \n", v_flag, &v_flag); v_flag++; printf("v_flag = %d\n", v_flag);...
View Articleerror: cannot specify -o when generating multiple output files
How to fix this error?I am trying to compile the C project, but I get such errorAlekseys-MBP:mmn14 aleksey$ make gcc -Wall -ansi -pedantic -c -o assembler.o assembler.c gcc -Wall -ansi -pedantic -c -o...
View ArticleCompatibility of printf with utf-8 encoded strings
I'm trying to format some utf-8 encoded strings in C code (char *) using the printf function. I need to specify a length in format. Everything goes well when there are no multi-bytes characters in...
View ArticleHow to disable relro to overwrite fini_array or got.plt element
I am reading the book Hacking: The art of exploitation and there is a format string exploit example which attempts to overwrite an address of the dtors with the address of a shellcode environment...
View ArticleHow to prevent Atmel Studio gcc 6.3.1 from optimizing 4-byte memcmp() to a...
Running Atmel Studio with its provided gcc 6.3.1 to build firmware for an Atmel/Microchip SAMV70 (ARM Cortex-M7) chip. I have code that compares a 4-byte input array to a 4-byte local array using...
View ArticleCan gcc display the pointer types when reporting "assignment from...
Earlier today I was looking into this question: Why does one need to specify the row while assigning a pointer to a 2D Array? There was some confusion/disagreement regarding the types involved when...
View ArticleSegfault on fresh compile of Python3.8.2
I compiled Python3.8.2 from scratch on Ubuntu 18.04.1.Here's what I did:tar xvzf Python3.8.2.tar.xz cd Python3.8.2 ./configure --enable-optimizations --with-lto make -j8 sudo make altinstall This is...
View ArticleError installing python-snappy: snappy-c.h: No such file or directory
I am using amazon ec2 ubuntu 11.04 server sudo pip install python-snappy also I tried to downloaded package and entered "sudo python setup.py install"I got the error: running build running build_ext...
View ArticleHow to remove GCC warning on #pragma region?
How to remove GCC warning on #pragma region ? I added pragma region to easily look at code but it reports warnings on #pragma region. I am using Visual Studio 2010.
View ArticleIs this undefined behavior
From my understanding, this program should have undefined behavior. #include <stdio.h> int main() { int a = 3, b = 3, c = 10, d = 20; int e = (a++ * ++b)-((c / b) * a) + d; printf("%d", e) ;...
View Article