Questions tagged [libc]

The C standard library consists of a set of sections of the ISO C standard which describe a collection of headers and library routines used to implement common operations, such as input/output and string handling, in the C programming language.

The C standard library consists of a set of sections of the ISO C standard which describe a collection of headers and library routines used to implement common operations, such as input/output and string handling, in the C programming language.

There are many implementations of libc with different resource requirements, security goals, etc. With a typical tool chain the libc, compiler and OS work together to achieve some ISO, Posix or custom features/standards. Some libc implementation are only a subset of the ISO standard, but still full featured enough to be used in many applications.

Specific libc tags:

  • - the full Gnu Libc found on most GCC installs.
  • - a smaller micro-controller libc for resource constrained devices
  • - Android libc
  • - unhosted libc
  • - more modern lighter foot print libc

Websites

See also:

Do not confuse with , which is for the C++ programming language.

1076 questions
0
votes
2 answers

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.…
Shreyas
  • 380
  • 1
  • 4
  • 15
0
votes
1 answer

What is alternative API for posix_fallocate

I'm working on a customized android target board. The board file system is mounted over NFS. There is a API call procedure Libcore.os.posix_fallocate which tries to create length of a physical file, but the operation failed due to "Error:Operation…
georgewhr
  • 174
  • 1
  • 12
0
votes
1 answer

How to use Glibc feature test macros?

I'd line to use pthread_setname_np function if it's available. Code from the manpage: #define _GNU_SOURCE /* See feature_test_macros(7) */ #include int pthread_setname_np(pthread_t thread, const char *name); int…
Velkan
  • 7,067
  • 6
  • 43
  • 87
0
votes
1 answer

Address out of bound error in File pointer

We are observing SIGABORT while reading a stream from File pointer which is returned from popen(). File pointer wasn't NULL. But reading File pointer results in a crash. My Code -: if ((fp = popen(cmd, "r")) == NULL) { …
0
votes
1 answer

FILE* reading with timeout

I'm making a communication library that takes a filestream and uses it to read and write. The protocol defines timeouts, so I want to use them. I'm using fread(3) and fwrite(3). I have heard of select(2), and it's what I'm looking for, except it…
Cakeisalie5
  • 384
  • 3
  • 10
0
votes
1 answer

Why IOS terminates application with call clientSystemApplicationTerminated

My IOS application has many threads, usually 60. and of of them sometimes (very rarely) receives next: 11 libsystem_c.dylib 0x0000000180fb5364 exit + 20 12 FrontBoardServices 0x0000000182e86fb4 -[FBSWorkspace clientSystemApplicationTerminated:] +…
0
votes
0 answers

Intel Pin under Valgrind. Library error?

When i run intel pin under valgrind i get the following error: ERROR: ld.so: object '/usr/lib/valgrind/vgpreload_core-x86-linux.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object…
Orion Papadakis
  • 398
  • 1
  • 14
0
votes
0 answers

one binary for several Linux distros, one compiler for all

First Question: What is the best way to support various 'standard' Linux platforms with a single C++11 binary? This binary uses a handful of third party libraries including boost, zlib, xml2, openssl (all of which I can build statically). The binary…
Vic
  • 1
  • 1
0
votes
1 answer

ARM Assembly: Values stored by scanf are not saved correctly.

I am trying to read several values (one at a time) with scanf in ARM Assembly. I manage to get the scanf portion working and it apparently saves the values right. But when i want to retrieve them I only get the last number right and the other ones…
Xavier Merino
  • 679
  • 1
  • 5
  • 19
0
votes
1 answer

strange number change in objective-c code

I have this code to break up numbers entered at the console and return them and I do the same for negative numbers, but here is the strange behaviour I enter 0123and the number gets converted to 83. I am new to objective-c and c, so I need some…
George Udosen
  • 906
  • 1
  • 13
  • 28
0
votes
2 answers

How can I debug program linking specific version of shared library?

helloworld.c: int main(){} [1] 9845 illegal hardware instruction (core dumped) LD_PRELOAD=./libc.so.6 ./helloworld This preload libc is an old version of glibc Can I debug helloworld linking it on my system? Or is there a fast way to deploy a…
Donald Wu
  • 107
  • 1
  • 9
0
votes
1 answer

Compile glibc without TLS support

I read on the GNU web page (http://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html) that glibc can be compiled without the TLS support by using the option '--without-tls'. So I did, using the following command: ../configure…
badnack
  • 737
  • 1
  • 11
  • 20
0
votes
1 answer

Crashing when using jni at libc.so in android

After call the native method 'sign4Android' in .so, the app is crashed. The codes and logs are below. please help! Codes: extern "C" JNIEXPORT jstring JNICALL Java_com_XXX_sign_SignHelper_getSign(JNIEnv *env, jobject obj, jstring input){ const…
nuaa_tiger
  • 31
  • 1
  • 9
0
votes
1 answer

Quadratic equation- Assembly- using scanf

I am creating an assembly program to solve a quadratic equation. Our professor gave us part of the code, but whenever I run hers with what I've added, I get an error using 'scanf'. it says undefined reference to printf and also undefined reference…
Elizabeth
  • 13
  • 1
  • 7
0
votes
0 answers

In my Cell Phone,it occurs "@@@ ABORTING: INVALID HEAP ADDRESS IN dlfree"

04-07 10:45:29.340: A/libc(18699): @@@ ABORTING: INVALID HEAP ADDRESS IN dlfree 04-07 10:45:29.340: A/libc(18699): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1) The above is all the log.In the project,it doesn't use JNI and AsyncTask. There…