From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Catonano Newsgroups: gmane.lisp.guile.user Subject: segmenation fault Date: Fri, 9 Jun 2017 09:21:35 +0200 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1496992994 11298 195.159.176.226 (9 Jun 2017 07:23:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Jun 2017 07:23:14 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Jun 09 09:23:10 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJEGE-0002PT-IS for guile-user@m.gmane.org; Fri, 09 Jun 2017 09:23:10 +0200 Original-Received: from localhost ([::1]:53168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJEGD-0000VE-8a for guile-user@m.gmane.org; Fri, 09 Jun 2017 03:23:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJEEm-0008Fv-FA for guile-user@gnu.org; Fri, 09 Jun 2017 03:21:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJEEl-000888-BO for guile-user@gnu.org; Fri, 09 Jun 2017 03:21:40 -0400 Original-Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:33809) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJEEl-00087k-44 for guile-user@gnu.org; Fri, 09 Jun 2017 03:21:39 -0400 Original-Received: by mail-wm0-x22d.google.com with SMTP id d64so1568133wmf.1 for ; Fri, 09 Jun 2017 00:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=v+97caqMnnWlgDL7oUhOhbNwu09fGMKD6BinPQUOGNU=; b=t3Kdo0E6GGz4zqeNtMBQ0wTmtqRiE7S0XCo9QolmlTjETh/Azzo1ekkMHtr7ast6Az VNGDdK5vxHpEMo7oa68FA80AS/pe6GT0UiX2XV5nHAFt1gi0TmRItfVkP5z0fkWgCyCM BAmEGjTwRt5DX91O9J5swkoKomQcbSsLXlO1cQzp5rQuStQJGxKkBVvDCE2jD4gUwJ/m y6gLUpr8AxkFMXaucWUlq6ZvWl4yZxpgtBjqWCuSqS5+mKDuyREH3TcZ1kEuPVyznShy 5faIy2HpLXqWyJzv+f3Z2fUun2IPge58zb8AdvhiQlhxpv97keCsgXgrwY85SU86X6gM +62Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=v+97caqMnnWlgDL7oUhOhbNwu09fGMKD6BinPQUOGNU=; b=nJrwJd8ojrgx4CGtw4C7aduNZGbvU8257jnSCCvdMBdOb/MZH9gzWlsideZ42QlU7f EqGBtcgsGv3VsR1CSCayvJ4B4ZhnVq5V/Mfb6n/9edWQIHZEk2JJSwQ6qOHtx+YMxITe W3PsI9SltorbfAjmAArqBW2KJITVbGva3LSX5sYbA/TQ0VORZXIXGUhibRkJV/E3+0bk tRN0/liGL6Ry1s+MjCNWJfr/nN+Gx/sFdoBabTj9HoAhZUdewV3f4TOCABwPDOafuVrO f5po5PI1yeX+YYG451f8ZckaLD1bFh/b8zSZDgyWnDrpj4WE7eyV3qIAHVBtMvGUIhPD aokQ== X-Gm-Message-State: AODbwcAvvgZ5BjGHGhYhLYyVPDJyMmVcN348ZUkGwid1k8uTeiVLlLrp mV21O7n4WEOtUuQKIafOpBQcDb3FVg+w X-Received: by 10.80.160.231 with SMTP id 94mr30617214edo.173.1496992896247; Fri, 09 Jun 2017 00:21:36 -0700 (PDT) Original-Received: by 10.80.131.4 with HTTP; Fri, 9 Jun 2017 00:21:35 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22d X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.lisp.guile.user:13781 Archived-At: in using the guile FFI I am having a segmentation fault This is the C unction that I'm trying to wrap https://www.gaia-gis.it/gaia-sins/freexl-1.0.1-doxy-doc/html/freexl_8h.html#acbd27ba5bc7b21d4ae32c0542d51f1e4 My code is here https://gitlab.com/humanitiesNerd/guile-freexl (configure is to be called with --with-freexl-libdir=... otherwise it won't work) Here's an excerpt (define freexl-open (let* ((ptr (freexl-func "freexl_open")) (proc (pointer->procedure int ptr '(* *))) ;;const char *path, const void **xls_handle ) (lambda (path) (let ((handle (scm->pointer 0)) (path-ptr (string->pointer path))) (proc path-ptr handle))))) At the REPL, when calling it with > (freexl-open"resources/Lavoro_P.xsl") it produces a segmentation fault probably this line (scm->pointer 0) is not correct But I don't know how to produce a void pointer and then pass it to freexl-open Thanks in advance