tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Valgrind Inconsistency detected by ld.so: rtld.c:


From: Domingo Alvarez Duarte
Subject: Re: [Tinycc-devel] Valgrind Inconsistency detected by ld.so: rtld.c:
Date: Fri, 28 Mar 2014 11:51:44 +0000

Now that valgrind works I run it on linux X86_64 against fossil-scm compiled with tcc and got this:

==32200== Nulgrind, the minimal Valgrind tool
==32200== Copyright (C) 2002-2013, and GNU GPL'd, by Nicholas Nethercote.
==32200== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==32200== Command: /home/mingo/dev/c/fossil-src-20140127173344/fossil server
==32200== 
==32200== 
==32200== Process terminating with default action of signal 11 (SIGSEGV)
==32200==  Access not within mapped region at address 0x18
==32200==    at 0x46BEB49: _int_malloc (malloc.c:3827)
==32200==    by 0x46C0F94: malloc (malloc.c:2924)
==32200==    by 0x8220083: __va_start (in /home/mingo/dev/c/fossil-src-20140127173344/fossil)

Any clue on this ?
Cheers ! 


On Fri, Mar 28, 2014 at 10:59 AM, Domingo Alvarez Duarte <address@hidden> wrote:
Hello !

Trying to test tinycc on linux X86_64 I get this error with valgrind:

Inconsistency detected by ld.so: rtld.c: 1284: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed!

Comparing the headers generated by other compilers it seem that tinycc is missing the PHDR entry, and making the following preprocessor test always true on tccelf.c seems to fix the problem, anyone knows this better and can explain it ?

#if 1 //<<<<<<<<<<<<<< //defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#define HAVE_PHDR       1
#define EXTRA_RELITEMS  14

/* move the relocation value from .dynsym to .got */
void patch_dynsym_undef(TCCState *s1, Section *s)

Cheers !


reply via email to

[Prev in Thread] Current Thread [Next in Thread]