Skip to content

Tag: glibc

Putty: Network Error: Software caused connection abort

I have RHEL 6.8 Machine installed in a VM. I moved one file libc.so.6 from /lib64/ to /lib64/backup/. Since then I am not able to connect to that machine through Putty or WinSCP. Both the tools give the same error. Software caused connection abort. As I haven’t created this VM, I don’t have permis…

glibc Cross Compile Configure Error

I would like to cross compile glibc. But, I ‘m getting an error. glibc version is 2.24. I tried compiling host and target i686-elf. My $MACHTYPE environment label is x86_64-pc-linux-gnu. Target directory includes binutils-2.27 and gcc-6.2.0. My PATH environment is: /home/ercan/cross/tools/tools_binaries…

Linux synchronization without polling

In principle what I want is very simple. Two executables ./read and ./write respectively read and write from a resource (let’s say a file). Using flock(2) it is easy to prevent race conditions between arbitrary invocations of ./read and ./write at arbitrary times. The requirement is that each invocation…

Understanding glibc malloc trimming

Some program that I am currently working on consumes much more memory than I think it should. So I am trying to understand how glibc malloc trimming works. I wrote the following test: Test output (without calling malloc_trim): Even though almost all memory was released, this test code consumes much more resid…

Double Free – crash or no crash

Can someone explain me why freeing a twice in a row causes a crash, but freeing a first, then b, and then a again does not crash? I know that a free will insert the heap chunk in a double linked free list. Freeing twice would insert the same chunk twice in the free list. But why is the crash

How to remove a broken installation of glibc

I just attempted to install glibc version 2.19 to my computer as follows: 1) I cloned the glibc git repo with 2) I checked out version 2.19 with 3) I made a directory objdir in my home directory, and built the installation there with 4) I tested the make with This gave me an error, but some webpage I found