[Top][All Lists]

[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: Tue, 1 Apr 2014 12:53:05 +0100

Hello Daniel !

Just in case do you want to look at it too, I discovered other issue with sqlite3 compiled with tcc on arm,
running the query bellow on sqlite3-gcc takes 1 second but doing the same on sqlite3-tcc takes for ever,
if we remove the call to datetime and use only the field mtime the the sqlite3-tcc works almost like sqlite3-gcc.

Obs.: "fossil.fossil" is the database of fossil-scm local repository.
sqlite3-gcc fossil.fossil < query.sql
sqlite3-tcc fossil.fossil < query.sql

  datetime(event.mtime) AS timestamp
 FROM event 
ORDER BY 1 --event.mtime 

On Mon, Mar 31, 2014 at 11:14 PM, Domingo Alvarez Duarte <address@hidden> wrote:
Hello Daniel !

I'm still looking at why fossil-scm compiled by tcc do not work properly and found that now the problem is with the sqlite3 sources compiled with tcc, in a place where we have a fossil repository database I run this:

#include <stdio.h>
#include <stdarg.h>
#include "src/sqlite3.h"

static int mydb_exists(sqlite3 *db, const char *zSql, ...){
  va_list ap;
  int rc;
  va_start(ap, zSql);
  sqlite3_stmt *pStmt;
  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
printf("%s:%d -> %d %s\n", __FILE__, __LINE__, rc, zSql);
  rc = sqlite3_step(pStmt);
printf("%s:%d -> %d %s\n", __FILE__, __LINE__, rc, zSql);
  if( rc !=SQLITE_ROW ) {
    rc = 0;
    rc = 1;
  return rc;

static const char *sql = "SELECT "
"  blob.rid AS blobRid, "
"  uuid AS uuid, "
"  datetime(event.mtime) AS timestamp, "
"  coalesce(ecomment, comment) AS comment, "
"  coalesce(euser, user) AS user, "
"  blob.rid IN leaf AS leaf, "
"  bgcolor AS bgColor, "
"  event.type AS eventType, "
"  (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref "
"    WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid "
"      AND tagxref.rid=blob.rid AND tagxref.tagtype>0) AS tags, "
"  tagid AS tagid, "
"  brief AS brief, "
"  event.mtime AS mtime "
" FROM event CROSS JOIN blob "
"WHERE blob.rid=event.objid "
" AND NOT EXISTS(SELECT 1 FROM tagxref     WHERE tagid=5 AND tagtype>0 AND rid=blob.rid) ORDER BY event.mtime DESC LIMIT 20";

int main() {

sqlite3 *db;
int rc = sqlite3_open_v2(
      "fossil.fossil", &db,
printf("%d Exists %d\n", rc, mydb_exists(db, sql));
return 0;

compiling it with this script:

gcc -o test-query-gcc test-query.c src/sqlite3.c -ldl -lpthread
tcc -o test-query-tcc test-query.c src/sqlite3.c -ldl -lpthread

And get results from the test-query-gcc but no results from  test-query-tcc, now I'll try to get more close to the problem.

Cheers !

On Sat, Mar 29, 2014 at 5:57 PM, Domingo Alvarez Duarte <address@hidden> wrote:
Hello Daniel !

With your commit tcc can compile and run the server but it's not all functional, like the timeline shows nothing.

I'll further invetigate why and send you more details about what can be now.

Thanks so much !

On Sat, Mar 29, 2014 at 5:20 PM, Daniel Glöckner <address@hidden> wrote:
On Fri, Mar 28, 2014 at 12:27:39PM +0000, Domingo Alvarez Duarte wrote:
> For arm experts, it gets a segfault on translate.c:98

Please try again with current mob.
I fixed a bug that might be the cause for your segfault.

Best regards,


P.S.: I wonder if a better fix would be to use convert_parameter_type in

Tinycc-devel mailing list

reply via email to

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