unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Re: crash in guile-sqlite3
@ 2012-05-01 19:37 Sunjoong Lee
  2012-05-02  4:41 ` Joonas Sarajärvi
  0 siblings, 1 reply; 20+ messages in thread
From: Sunjoong Lee @ 2012-05-01 19:37 UTC (permalink / raw)
  To: guile-user; +Cc: Daniel Krueger

[-- Attachment #1: Type: text/plain, Size: 905 bytes --]

Hi, Daniel and Joonas;

2012/5/1 Daniel Krueger <keenbug@googlemail.com>
>
> (make-pointer (bit-extract (lognot 0) 0 (* 8 (sizeof '*))))
>

Good and thank you. I made a new patch based on that.

> On Tue, May 1, 2012 at 5:01 PM, Joonas Sarajärvi <address@hidden> wrote:
> >> Replying to myself, I now noticed that the change will not work in a
> >> 64-bit computer. My impression is that this is due to the fact that
> >> the 5th parameter taken by sqlite3_bind_text function is really a
> >> pointer and not an int. On amd64 computers, int are 4 bytes wide while
> >> pointers are 8 bytes.
>

Sorry for my introducing a new bug. In the most platform, pointers are 8
byte unsigned integer. I had thought you would forget making a merge
request on gitorious and made a new patch.

Joonas, test my new one on your 64-bit computer and/or make a merge request
of yours unless it work.

[-- Attachment #2: Type: text/html, Size: 1663 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: crash in guile-sqlite3
@ 2012-04-27  5:40 Sunjoong Lee
  2012-04-27 19:00 ` David Pirotte
  2012-04-29  1:58 ` Sunjoong Lee
  0 siblings, 2 replies; 20+ messages in thread
From: Sunjoong Lee @ 2012-04-27  5:40 UTC (permalink / raw)
  To: Joonas Sarajärvi; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

Hi, Joonas;

2012/4/26 Joonas Sarajärvi <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 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.

[-- Attachment #2: Type: text/html, Size: 1382 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread
* crash in guile-sqlite3
@ 2012-04-26 18:51 Joonas Sarajärvi
  2012-04-26 20:24 ` rixed
  0 siblings, 1 reply; 20+ messages in thread
From: Joonas Sarajärvi @ 2012-04-26 18:51 UTC (permalink / raw)
  To: guile-user; +Cc: dzu

Hello,

Some time ago, I noticed that there is a nice-looking libsqlite3
wrapper for Guile available at [1]. I am now trying to use it, but the
short example program I wrote seems to cause guile to crash in certain
places where sqlite-finalize is called.

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.

The test program that demostrates this behavior is available in [2]
and it is also attached to this message. On a 32-bit Exherbo
installation with guile-2.0.5 it reproducibly crashes into "Illegal
instruction" message, while in a 64-bit Fedora 16 installation that
has guile-2.0.2 added it produces a Segmentation fault. The program is
fairly short, which I hope might make it easier to track the problem
down.

Is guile-sqlite3 actually in such a shape that it might be useful for
curious testers?

Thanks,
-- Joonas Sarajärvi

References:
[1] http://gitorious.org/guile-sqlite3
[2] http://paste.pocoo.org/show/587676/



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2012-05-02  4:41 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-01 19:37 crash in guile-sqlite3 Sunjoong Lee
2012-05-02  4:41 ` Joonas Sarajärvi
  -- strict thread matches above, loose matches on Subject: below --
2012-04-27  5:40 Sunjoong Lee
2012-04-27 19:00 ` David Pirotte
2012-04-27 20:08   ` Sunjoong Lee
2012-04-27 22:58     ` David Pirotte
2012-04-27 23:59     ` David Pirotte
2012-04-29  1:58 ` Sunjoong Lee
2012-04-30  9:00   ` Andy Wingo
2012-04-30 10:32     ` Sunjoong Lee
2012-04-30 10:46       ` Andy Wingo
2012-04-30 12:44         ` Sunjoong Lee
2012-05-01 11:45   ` Joonas Sarajärvi
2012-05-01 15:01     ` Joonas Sarajärvi
2012-05-01 15:05       ` Daniel Krueger
2012-05-01 15:10         ` Daniel Krueger
2012-04-26 18:51 Joonas Sarajärvi
2012-04-26 20:24 ` rixed
2012-04-26 21:04   ` Noah Lavine
2012-04-27  6:31     ` rixed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).