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: Mon, 31 Mar 2014 23:14:38 +0100

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);
  va_end(ap);
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;
  }else{
    rc = 1;
  }
  sqlite3_finalize(pStmt);
  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,
      SQLITE_OPEN_READWRITE, NULL);
printf("%d Exists %d\n", rc, mydb_exists(db, sql));
sqlite3_close(db);
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,

  Daniel


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

_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel



reply via email to

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