glibc

'__glibcxx_requires_valid_range' was not declared in this scope (xcode)

I'm trying to use in an Xcode (iphone) static library, and can't figure out this error. Anyone else had this before? It borks in the file stl_algobase.h at these places: __glibcxx_requires_valid_range(__first, __last); I've tried using GCC 4.0, but it always includes from here: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs...

Linking to specific or greater library versions using GCC

I am trying to build the BlueZ bluetooth stack to run on an ARM powered GP2X wiz device. I am cross-compiling for the ARM device on a debian machine. I have built the complete stack and all its dependencies, (libusb0.12, dbus, glib-2.0, etc) but I run into issues when running them on the target, and it appears dbus doesn't want to play....

can memory corruption be caused by invalid *reading* freed memory?

I'm getting *** glibc detected *** (/my/program/...): malloc(): memory corruption: 0xf28000fa *** I've run under valgrind, which reports cases of reading memory that has been freed, but no cases of illegal memory writes. Could reading freed memory cause memory corruption? If not, any suggestions where else to look beyond the valgri...

open O_CREAT | O_EXCL on NFS in Linux?

When in the Linux 2.6 kernel and in NFSv3 did open("fname", O_CREAT|O_EXCL) became valid? The current canonical open(2) system call documentation (http://www.kernel.org/doc/man-pages/online/pages/man2/open.2.html) says everything is fine: O_EXCL ... On NFS, O_EXCL is only supported when using NFSv3 or later on kernel 2.6 or later. I...

Linux static linking is dead?

In fact, -static gcc flag on Linux doesn't work now. Let me cite from the GNU libc FAQ: 2.22. Even statically linked programs need some shared libraries which is not acceptable for me. What can I do? {AJ} NSS (for details just type `info libc "Name Service Switch"') won't work properly without shared libraries. NSS al...

How to determine version of glibc (glibcxx) binary will depend on?

It's well known that glibc (and, as far as I know, glibstd++ also) uses symbol versioning mechanism. (For the details refer: How can I link to a specific glibc version.) The question is how to determine exact versions of GLIBC and GLIBCXX will be chosen by linker for names from libc and libstdc++? For example, how to get something like...

What does glibc detected ...httpd: double free or corruption mean?

I have asked this question on serverfault.com which is as suggested a more appropriate place for it - http://serverfault.com/questions/169829/what-does-glibc-detected-httpd-double-free-or-corruption-mean I have an EC2 server running that I use to process image uploads. i have a flash swf that handles uploading to the server from my lo...

Compile C program in Linux with different glibc library

Hi, I have a firewall appliance base on linux that have glibc-2.3.4, and have not gcc to compile a program for that. when I compile a program by another linux machine, error message says: require glibc.x.x.x how can I compile a c program in another linux machine for that version of glibc? ...

Sun JVMs memory allocator compared to others

How does Sun JVMs memory allocator (here and here) compares to glibcs malloc (a modified ptmalloc2) or jemalloc? For example, a good article which discusses the benefits of jemalloc in comparison to the old phkmalloc implementation (the earlier default in FreeBSD) can be found in the initial presentation of jemalloc. Common problems of ...

Regular Expression for detecting repeated substrings is SLOW

I am trying to come up with a GNU extended regular expression that detects repeated substrings in a string of ascii-encoded bits. I have an expression that works -- sort of. The problem is that it executes really slowly when given a string that could have many solutions The expression ([01]+)(\1)+ compiles quickly, but takes about...

Back to older version of glibc

Hi all Currently, I use the 2.10.1 version glibc in my project, but I found this version cause some problem in my project. I want to back to version 2.5, what should I do? I use two different distribution, one is Ubuntu, another one is CentOs. Best Regards, ...

How to debug "glibc detected *** python: malloc(): memory corruption"

Hi All: I'm using python2.5 with scipy.weave to embed c code. In my c code, there is no malloc() function, but I received error like "glibc detected *** python: malloc(): memory corruption" from time to time.(It's a random algorithm) So how shall I debug it out? Thanks ...

How to put a GSList inside a GHashTable ?

I would like to put a GSList inside a GHashTable, here is how I managed all of this: #include <glib.h> #include <glib/gprintf.h> typedef struct Foo_ { GHashTable * bar; } Foo; Foo * create() { Foo * foo = g_malloc(sizeof(Foo)); foo->bar = g_hash_table_new(NULL, NULL); return foo; } void add_element(Foo * foo, gchar * key, gpo...

Can I edit dynamic library (.so) and add an .o to it?

Hello I have a .so dynamic library. Can I link into it an additional object file .o like "ar cr" for .a static libraries? ...

Why does backtrace not contain Objective-C symbols regardless of -rdynamic?

Update: I'm working with the GNU-runtime on Linux. The problem does not occur on MacOS with the Apple-runtime. Update 2: I compiled the GNU-runtime on MacOS and build the example with it. The error does not occur on MacOS with the GNU-runtime. I would say the problem is the glibc (since backtrace and backtrace_symbols are glibc extensio...

*** glibc detected *** free(): invalid next size (fast) -- should work?

I'm working on an existing c project (spglib on sourceforge), and I'm running into the following problem after cleaning up some array initializations: * glibc detected tests/spglibtest: free(): invalid next size (fast): 0x08ab46e0 ** The backtrace is: #0 0xb7fe1424 in __kernel_vsyscall () #1 0xb5cfdd61 in raise () from /lib/libc.so...

How do wildcards get set when building eglibc?

I am attempting to build the eglibc-2.11.2 package from source. Stupidly or not, I'm trying to backport it to Debian Lenny, mainly so I can build other things that require it without having to upgrade my whole system past stable. (Whether this is a good idea is an exercise for the reader.) I am using the Debianized source from sid. W...

undefined reference when linking against libresolv

Hi, I have a project that is a library that links against libresolv, It works fine on recent distros: Ubuntu 10.x Fedora 13, Mandriva 2010.1 but on Centos 5.x I get the following errors glibc installed is: glibc-2.5-18.el5_1.1 g++ -DHAVE_CONFIG_H -I. -I./include -I/usr/include/postgresql -O3 -ansi -Wall -Wno-deprecated -D_FORTIF...

Process terminated by signal 6, core shows kind of loop in libc

Hi On analysis of the core of a process (terminated by signal 6), on LINUX, stack bt shows : Core was generated by `/opt/namsam/pac_rrc_qx_e1/bin/rrcprb'. Program terminated with signal 6, Aborted. #0 0x0000005555ffb004 in epoll_wait () from /lib64/libc.so.6 (gdb) bt #0 0x0000005555ffb004 in epoll_wait () from /lib64/libc.so.6 #1...