Questions tagged [glibc]

The GNU C library is used as the C library in the GNU system and most systems with the Linux kernel. It defines the "system calls" and other basic facilities such as open, malloc, printf, exit, etc.

2271 questions
57
votes
7 answers

What does 'corrupted double-linked list' mean

I've recently gotten the following error from my PHP: WARNING: [pool www] child 42475 said into stderr: "*** glibc detected *** php-fpm: pool www: corrupted double-linked list: 0x00000000013fe680 ***" I'm not very bothered by this issue, and not…
replay
  • 3,569
  • 3
  • 21
  • 30
57
votes
9 answers

/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

When I exectued command to install application following error accured: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory I was not aware of how to fix this problem, to find out resolution I searched for solotutions on net and…
vijay
  • 587
  • 1
  • 4
  • 4
57
votes
3 answers

How does malloc work in a multithreaded environment?

Does the typical malloc (for x86-64 platform and Linux OS) naively lock a mutex at the beginning and release it when done, or does it lock a mutex in a more clever way at a finer level, so that lock contention is reduced for concurrent calls? If it…
pythonic
  • 20,589
  • 43
  • 136
  • 219
56
votes
2 answers

What's the meaning of the %m formatting specifier?

The output for this code printed out ‘Success’. printf("%m\n");
Manuel
  • 976
  • 3
  • 9
  • 21
56
votes
3 answers

building a .so that is also an executable

So everyone probably knows that glibc's /lib/libc.so.6 can be executed in the shell like a normal executable in which cases it prints its version information and exits. This is done via defining an entry point in the .so. For some cases it could be…
user175104
  • 3,598
  • 2
  • 23
  • 20
51
votes
2 answers

What is __i686.get_pc_thunk.bx? Why do we need this call?

When I disassemble my small function, I happened to see this call call 0xf60d2f47 <__i686.get_pc_thunk.bx>. I have no clue why I need this call in my program. Any explanation would be helpful.
Thangaraj
  • 3,038
  • 7
  • 40
  • 43
51
votes
1 answer

Understanding "corrupted size vs. prev_size" glibc error

I have implemented a JNA bridge to FDK-AAC. Source code can be found in here When bench-marking my code, I can get hundreds of successful runs on the same input, and then occasionally a C-level crash that'll kill the entire process, causing a…
Sheinbergon
  • 2,875
  • 1
  • 15
  • 26
49
votes
8 answers

Pthread mutex assertion error

I'm encountering the following error at unpredictable times in a linux-based (arm) communications application: pthread_mutex_lock.c:82: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed. Google turns up a lot of references to that…
Dave Causey
  • 13,098
  • 7
  • 30
  • 26
46
votes
14 answers

Error while importing Tensorflow in Python 2.7 in Ubuntu 12.04. 'GLIBC_2.17 not found'

I have installed the Tensorflow bindings with python successfully. But when I try to import Tensorflow, I get the follwoing error. ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.17' not found (required by…
Tanvir
  • 875
  • 3
  • 11
  • 19
46
votes
1 answer

What is _GLIBCXX_USE_NANOSLEEP all about?

A preprocessor macro called _GLIBCXX_USE_NANOSLEEP appears in two standard header files: c++/4.7.1/x86_64-unknown-linux-gnu/bits/c++config.h c++/4.7.1/thread In a default build of GCC 4.7.1 (Linux, 64-bit) the only thing c++config.h includes is…
jogojapan
  • 68,383
  • 11
  • 101
  • 131
41
votes
3 answers

GLIBCXX versions

If I compile a C++ program on my machine, and run it on another one (with older software) I get: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found. In fact on my system glibc is newer (I got gcc-libs 4.5.1: libstdc++.so.6.0.14) and strings…
peoro
  • 25,562
  • 20
  • 98
  • 150
40
votes
2 answers

glibc, glib and gnulib

what are differences in the strength and features in gnulib glib and glibc Thanks!
Tim
  • 1
  • 141
  • 372
  • 590
38
votes
3 answers

An alternative for the deprecated __malloc_hook functionality of glibc

I am writing a memory profiler for C and for that am intercepting calls to the malloc, realloc and free functions via malloc_hooks. Unfortunately, these are deprecated because of their poor behavior in multi threaded environments. I could not find a…
Andreas Grapentin
  • 5,499
  • 4
  • 39
  • 57
36
votes
2 answers

_GNU_SOURCE and __USE_GNU

I want to use CPU_SET, which is a glibc linux-specific macro that should be defined in sched.h The manpage clearly states that _GNU_SOURCE must be defined so that the macro is defined. However, looking at the header, CPU_SET is defined only if…
Foo Bah
  • 25,660
  • 5
  • 55
  • 79
36
votes
4 answers

What size should I allow for strerror_r?

The OpenGroup POSIX.1-2001 defines strerror_r, as does The Linux Standard Base Core Specification 3.1. But I can find no reference to the maximum size that could be reasonably expected for an error message. I expected some define somewhere that I…
mat_geek
  • 2,481
  • 3
  • 24
  • 29