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: Mon, 30 Apr 2012 19:32:43 +0900 Message-ID: References: <87zk9tppb7.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d04428dcaa3745404bee2fa93 X-Trace: dough.gmane.org 1335782000 2144 80.91.229.3 (30 Apr 2012 10:33:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 30 Apr 2012 10:33:20 +0000 (UTC) Cc: guile-user@gnu.org To: Andy Wingo Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Apr 30 12:33:19 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 1SOnus-0007Vt-Hv for guile-user@m.gmane.org; Mon, 30 Apr 2012 12:33:14 +0200 Original-Received: from localhost ([::1]:56173 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOnur-00081c-TF for guile-user@m.gmane.org; Mon, 30 Apr 2012 06:33:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOnum-00081H-Lb for guile-user@gnu.org; Mon, 30 Apr 2012 06:33:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SOnuk-0008Pg-Jx for guile-user@gnu.org; Mon, 30 Apr 2012 06:33:08 -0400 Original-Received: from mail-wg0-f49.google.com ([74.125.82.49]:57092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOnuk-0008PG-Ai for guile-user@gnu.org; Mon, 30 Apr 2012 06:33:06 -0400 Original-Received: by wgbds1 with SMTP id ds1so2003206wgb.30 for ; Mon, 30 Apr 2012 03:33:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=xCHItYOZnIFNmouSeaBNVSvd/7x0RQ6O3lSqPh5aqmM=; b=opQ36S+/uQGvSOlRH4u+lHb8FruzHJqDOJsQh5OkPsOTn3EB6w2A4+WQwEJF3fVrm8 U+E4fWfa/eibIVWGNCwpB7ChOcWWDBio9PoFIBRj1LI0Vu6cr8jgLN+r4W+0jg5JMux0 nhL0N5bB5YKFrbaBxsup39b8IagNbJQj6eUBAmbzmS9QHxS5Z2qGsOveL9TIVOfiaezj MxQYjV/u1OqIBuwBftfdNChC44DYc5MENXhA/veZ2DgyjsEcdeNfFdH2vkJcHtf4iLaB joFUHWZR5Z6Wvro574cSrrYLFbMCJLtJjg/Y9bMx4VqHW8c3kMN5XGMpwFnhwldeJxqi lDIg== Original-Received: by 10.180.104.230 with SMTP id gh6mr14213708wib.22.1335781983745; Mon, 30 Apr 2012 03:33:03 -0700 (PDT) Original-Received: by 10.223.93.206 with HTTP; Mon, 30 Apr 2012 03:32:43 -0700 (PDT) In-Reply-To: <87zk9tppb7.fsf@pobox.com> 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:9425 Archived-At: --f46d04428dcaa3745404bee2fa93 Content-Type: text/plain; charset=UTF-8 2012/4/30 Andy Wingo > > Would you mind sending a pull request on gitorious? Preferably we could > add a test case too. > I apologize for my poor english; I'm willing to "send a pull request on gitorious" but don't know what means that sentence. Joonas had reported that Segmentation fault crash will be occur in guile-sqlite3 when you use sqlite-bind with a string; I think he would suspect it as sqlite-finalize's problem. I realized sqlite-bind treats sqlite-transient as a pointer and it would occur same Segmentation fault when you with bytevector; only numerical value will work well. That's because sqlite3_bind_blob and sqlite3_bind_text of libsqlite3 expect it's last argument as a function pointer or just uint64_t type of 0x00000000 or 0xffffffff; you can use C function if sqlite-transient be it but you should use 0x00000000 or 0xffffffff if not so, and the meaning of SQLITE_TRANSIENT is it's a 0xffffffff. Joonas, would you mind sending a pull request on gitorious? --f46d04428dcaa3745404bee2fa93 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
2012/4/30 Andy Wingo <wingo@pobox.com>
Would you mind sending a pull request on gitorious? =C2=A0Preferably we cou= ld
add a test case too.

=C2=A0I apologize = for my poor english; I'm willing to "send a=C2=A0pull request on g= itorious" but don't know what means that sentence.

<= /div>
Joonas had reported that Segmentation=C2=A0fault crash=C2=A0will be oc= cur in=C2=A0guile-sqlite3 when you use=C2=A0sqlite-bind with a string; I th= ink he would suspect it =C2=A0as sqlite-finalize's problem.
<= br>
I realized=C2=A0sqlite-bind treats sqlite-transient as a poin= ter and it would occur same=C2=A0Segmentation fault when you with=C2=A0byte= vector; only numerical value will work well. That's because=C2=A0sqlite= 3_bind_blob and=C2=A0sqlite3_bind_text of=C2=A0libsqlite3 expect it's l= ast argument as a function pointer or just=C2=A0uint64_t type of 0x00000000= or 0xffffffff; you can use C function if=C2=A0sqlite-transient be it but y= ou should use 0x00000000 or 0xffffffff if not so, and the meaning of SQLITE= _TRANSIENT is it's a 0xffffffff.

Joonas, would you mind sending a pull request on gitori= ous?

--f46d04428dcaa3745404bee2fa93--