From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sunjoong Lee Newsgroups: gmane.lisp.guile.user Subject: Re: crash in guile-sqlite3 Date: Fri, 27 Apr 2012 14:40:59 +0900 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d043d6461d039a804bea28d48 X-Trace: dough.gmane.org 1335505293 28556 80.91.229.3 (27 Apr 2012 05:41:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 Apr 2012 05:41:33 +0000 (UTC) Cc: guile-user@gnu.org To: =?UTF-8?Q?Joonas_Saraj=C3=A4rvi?= Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Apr 27 07:41:32 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SNdvw-0005Nc-Gl for guile-user@m.gmane.org; Fri, 27 Apr 2012 07:41:32 +0200 Original-Received: from localhost ([::1]:53867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNdvv-0002lq-TZ for guile-user@m.gmane.org; Fri, 27 Apr 2012 01:41:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNdvr-0002l9-2w for guile-user@gnu.org; Fri, 27 Apr 2012 01:41:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SNdvm-0000CF-Qr for guile-user@gnu.org; Fri, 27 Apr 2012 01:41:26 -0400 Original-Received: from mail-wg0-f49.google.com ([74.125.82.49]:44201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNdvm-0000BN-I3 for guile-user@gnu.org; Fri, 27 Apr 2012 01:41:22 -0400 Original-Received: by wgbds1 with SMTP id ds1so241602wgb.30 for ; Thu, 26 Apr 2012 22:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=GwBfZAVLA1njy4c9v3P5p+rfmDckvcN0aKMJeYydVpw=; b=0kjzHsMZZsT0+ceG2/CE6+QchoiUJqviG3TkYv1Byf9YXYMThV3txEtQU5SXCxZB0X QZiaLw2qNPr3v+Q4OmyAiY9+cm4NBuKPt03w9a322gSL6fSUYOl+JzISvEAlRpaVWIsR aKjBEX7NVE7l6wLaUOhmqdgH2Wc3OY49R/mmsWyjatzQbeQ6C9WnPpOiSha4qBqHWmLs GYGbnL7fgrR93pX8GRoro0Nu1Y6wJF4P8MIT9tFlgIjRKlSTrVN8DoHqM9GddE8ZRSBE xm5xsOIyQmYIIqa7k3ol8p6FDVarQkUEn1VNlrsWb4KCnSVlvGHzY+YhXMEx1loZm36o wDMA== Original-Received: by 10.180.77.233 with SMTP id v9mr2434807wiw.22.1335505280055; Thu, 26 Apr 2012 22:41:20 -0700 (PDT) Original-Received: by 10.223.93.206 with HTTP; Thu, 26 Apr 2012 22:40:59 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.49 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9400 Archived-At: --f46d043d6461d039a804bea28d48 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, Joonas; 2012/4/26 Joonas Saraj=C3=A4rvi > > I tried to run guile in gdb to get a backtrace from the crash. The > segfault seems to be triggered inside libsqlite3 code, but I could not > really get much useful information from it. I am thus writing here to > ask if someone else has more insight on why this is happening and if > it could be resolved. > Same crash on Guile 2.0.5. It looks like string encoding problem. Suppose name be an integer not a string like 10, it would not crash. sqlite-bind of Guile-SQLite3 will deliver this 10 to sqlite3_bind_int64 of libsqlite3. If a string, it will use sqlite3_bind_text of libsqlite3. Before delivering, it will encoding this string to utf-8 string pointer because sqlite3_bind_text need to know string pointer and it's length. I think you or Andy may look around that. --f46d043d6461d039a804bea28d48 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi,=C2=A0Joonas;

2012/4/26=C2= =A0Joonas Saraj=C3=A4rvi <muep@iki.fi= >
I tried to run guile = in gdb to get a backtrace from the crash. The
segfault seems to be triggered inside libsqlite3 code, but I could not
really get much useful information from it. I am= thus writing here to
ask if someone else h= as more insight on why this is happening and if
it could be resolved.

Same cras= h on Guile 2.0.5. It looks like string encoding problem. Suppose name be an= integer not a string like 10, it would not crash.=C2=A0sqlite-bind of=C2= =A0Guile-SQLite3 will deliver this 10 to=C2=A0sqlite3_bind_int64 of=C2=A0li= bsqlite3. If a string, it will use=C2=A0sqlite3_bind_text of=C2=A0libsqlite= 3. Before delivering, it will encoding this string to utf-8 string pointer = because sqlite3_bind_text need to know string pointer and it's length. = I think you or Andy may look around that.

--f46d043d6461d039a804bea28d48--