Skip to content
Advertisement

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 permission to restart it. But will restarting

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/i686/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games Console output have been listing to below: It is not configured and config.log that is in build-glibc which content

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 of ./read contains a snapshot of the resource from a previous

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 resident memory than expected: Process smaps: When I enable

Why is sys_fork not used by glibc’s implementation of fork?

In eglibc’s nptl/sysdeps/unix/sysv/linux/i386/fork.c there’s a definition: which is used in actual __libc_fork() as the heart of the implementation. But e.g. in Linux’s arch/x86/entry/syscalls/syscall_32.tbl exists a sys_fork entry, as well as in syscalls_64.tbl. So apparently Linux does have its special syscall for fork. So I now wonder: why does glibc implement fork() in terms of clone, if the kernel already provides

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

When should syscall function be used instead of glibc wrapper?

man page of syscall says, “it is useful when there is no wrapper function in c library”. If wrapper function is available, Is it always better to use wrapper function ? If not, when should prefer syscall over it? Answer Never. The only situation where you should ever consider using syscall() is to invoke a system call that doesn’t have

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

Advertisement