Stack smashing detected

Stack Smashing here is actually caused due to a protection mechanism used by gcc to detect buffer overflow errors. For example in the following snippet: The compiler, (in this case gcc) adds protection variables (called canaries) which have known values. An input string of size greater than 10 causes corruption of this variable resulting in … Read more

makefile:4: *** missing separator. Stop

make has a very stupid relationship with tabs. All actions of every rule are identified by tabs. And, no, four spaces don’t make a tab. Only a tab makes a tab. To check, I use the command cat -e -t -v makefile_name. It shows the presence of tabs with ^I and line endings with $. … Read more

Undefined reference to pthread_create in Linux

I picked up the following demo off the web from https://computing.llnl.gov/tutorials/pthreads/ But when I compile it on my machine (running Ubuntu Linux 9.04) I get the following error: This doesn’t make any sense to me, because the header includes pthread.h, which should have the pthread_create function. Any ideas what’s going wrong?

Why does ENOENT mean “No such file or directory”?

It’s an abbreviation of Error NO ENTry (or Error NO ENTity), and can actually be used for more than files/directories. It’s abbreviated because C compilers at the dawn of time didn’t support more than 8 characters in symbols.