glibc

*** glibc detected *** perl: double free or corruption (!prev): 0x0c2b7138 ***

浪尽此生 提交于 2020-01-03 12:28:26
问题 While running a perl program I encountered the following error *** glibc detected *** perl: double free or corruption (!prev): 0x0c2b7138 *** /lib/tls/i686/cmov/libc.so.6[0xb7daea85] /lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7db24f0] perl(Perl_pregfree+0x3e)[0x80a004e] perl(perl_destruct+0xcf1)[0x806b711] /usr/local/lib/perl/5.8.8/auto/threads/threads.so[0xb79d2dfb] /usr/local/lib/perl/5.8.8/auto/threads/threads.so[0xb79d2f9b] /usr/local/lib/perl/5.8.8/auto/threads/threads.so[0xb79d5fbb]

how to use settimeofday(2)?

隐身守侯 提交于 2020-01-03 06:04:13
问题 What am I doing wrong here? I expect settimeofday() to change the system time, not return EINVAL . $ uname -a Linux io 4.3.5-300.fc23.x86_64 #1 SMP Mon Feb 1 03:18:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux $ cat settimeofday.c #include <sys/time.h> #include <stdio.h> int main() { struct timeval tv = {0, 0}; if (settimeofday(&tv, 0) == -1) perror("settimeofday"); } $ gcc settimeofday.c $ sudo ./a.out settimeofday: Invalid argument The error is coming from a Thinkpad T450 running Fedora 23.

GLIBC_2.7 error updating node.js on CentOS

馋奶兔 提交于 2020-01-03 02:45:07
问题 I am trying to update the version of Node installed on a server. The version that was on there prior was 0.2.5 or something like that, so it was quite old. After some reading around I found that executing n stable would install the latest version of Node. Upon it's supposed installation, and now when I enter node -V , the console returned: node: /lib/libc.so.6: version `GLIBC_2.7' not found (required by node) So now I need to figure out how to fix that. I found a page describing installation,

Where is __builtin_va_start defined?

£可爱£侵袭症+ 提交于 2020-01-02 19:15:29
问题 I'm trying to locate where __builtin_va_start is defined in GCC's source code, and see how it is implemented. (I was looking for where va_start is defined and then found that this macro is defined as __builtin_va_start .) I used cscope -r in GCC 9.1's source code directory to search the definition but haven't found it. Can anyone point where this function is defined? 回答1: That __builtin_va_start is not defined anywhere . It is a GCC compiler builtin (a bit like sizeof is a compile-time

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

只愿长相守 提交于 2020-01-02 15:23:32
今天在linux里面想解压一下JDK的bin文件,报了下面错: ./jdk-6u33-linux-i586.bin: ./install.sfx.37057: /lib/ld-linux.so.2: bad ELF。。。。。。。。。。。。。。 网上查了一下,原来是在64位系统里面 执行 32位的程序。。。 好吧。。解决方案就是安装 glic 两个方法去安装: 1. 直接运行下面command去下载和安装,网络最好不要太烂了。。只有24M左右的东西而已。 sudo yum install glibc.i686 www.cit.cn 2.去系统光盘里面找(别人说的。。没试过) 找到系统光盘里的rpm 包,安装下面 glibc包 和nss包:(可能有一些不用也行,但还是把下面的包都装了) glib2-2.22.5-5.el6.i686.rpm glib2-2.22.5-5.el6.x86_64.rpm glib2-devel-2.22.5-5.el6.i686.rpm glib2-devel-2.22.5-5.el6.x86_64.rpm glibc-2.12-1.7.el6.i686.rpm glibc-2.12-1.7.el6.x86_64.rpm glibc-common-2.12-1.7.el6.x86_64.rpm glibc-devel-2.12-1.7.el6.i686

Understanding assembly language _start label in a C program

放肆的年华 提交于 2020-01-02 06:32:25
问题 I had written a simple c program and was trying to do use GDB to debug the program. I understand the use of following in main function: On entry push %ebp mov %esp,%ebp On exit leave ret Then I tried gdb on _start and I got the following xor %ebp,%ebp pop %esi mov %esp,%ecx and $0xfffffff0,%esp push %eax push %esp push %edx push $0x80484d0 push $0x8048470 push %ecx push %esi push $0x8048414 call 0x8048328 <__libc_start_main@plt> hlt nop nop nop nop I am unable to understand these lines, and

-pthread, -lpthread and minimal dynamic linktime dependencies

删除回忆录丶 提交于 2020-01-02 05:46:08
问题 This answer suggest -pthread is preferable to -lpthread because predefined macros. Empirically, -pthread gives me only one extra macro: #define _REENTRANT 1 and it also appears to force libpthread.so.0 as a dynamic linktime dependency. When I compile with -lpthread , that dependency is only added if I actually call any of the pthread functions. This is preferably to me, because then I wouldn't have to treat multithreaded programs differently in my build scripts. So my question is, what else

What corner cases must we consider when parsing $PATH on Linux?

妖精的绣舞 提交于 2020-01-02 02:38:20
问题 I'm working on a C application that has to walk $PATH to find full pathnames for binaries, and the only allowed dependency is glibc (i.e. no calling external programs like which). In the normal case, this just entails splitting getenv("PATH") by colons and checking each directory one by one, but I want to be sure I cover all of the possible corner cases. What gotchas should I look out for? In particular, are relative paths, paths starting with ~ meant to be expanded to $HOME, or paths

Building GCC with glibc in a non-standard location without root

跟風遠走 提交于 2020-01-01 08:59:06
问题 I have a system that I do not have root access to, but I need to install the current version of GCC (4.7.2) on. The system is running an x86_64 build of Linux 2.6.18 and already has GCC 4.1 (without C++ support even though --version says it was built with it). EDIT 5: At this point, the steps below are just one set of things that I've tried. I've started clean a few times since then. I'm looking for someone to detail the exact order I need to make everything in with all of the switches

MAP_ANONYMOUS with C99 standard

孤街醉人 提交于 2020-01-01 07:33:08
问题 I have an application that uses the mmap system call, I was having an issue getting it to compile for hours looking as to why I was getting MAP_ANON and MAP_ANONYMOUS were undeclared, I had a smaller section of code that I used and I saw I could compile it just fine so I tried just a basic compile and that worked, I saw that it fails when you add -std=c99. Is there a specific reason that MAP_ANON and MAP_ANONYMOUS are not valid in the C99 standard? I know that they aren't defined by POSIX but