delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/09/16/21:08:40

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; q=dns; s=default; b=IMPihNxlMazBGJDGPw6gk1VtjwnZP
UOQWbMIeCyyFnHMhSFpIq72xph5pjfcDRrItinScsBrIpzBTlJXBbLgonVjWx6Rr
3DkpYsKBs6PKMlUBWjmxlRkD1lae/7r95OtSSy/VFXwB3/QNssSTUYE6U2mc51Fo
jzjk3LpfUUtbRM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; s=default; bh=Hz/JDKS0YGf+gVq32iq0TAOutTo=; b=WkI
HqHQ8yes2CLaa8scxwAiTZcgioeF2M/Rm2QzTNfvCDk4Iif3ybyDQpqDWA4ciF2F
Mz4Yuibf5f0KrVOTxGAFib3oDT0k/zBTNrIZmWeQFZh1qpCNOUVUq6Yv61I7uWuf
d5TnxSrCOo6GSLITMCnsYPY2C5ePrQF2XarIi63A=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM,NO_RELAYS autolearn=ham version=3.3.2
X-HELO: mail-ob0-f177.google.com
MIME-Version: 1.0
X-Received: by 10.182.113.195 with SMTP id ja3mr2369005obb.46.1379380102637; Mon, 16 Sep 2013 18:08:22 -0700 (PDT)
Date: Mon, 16 Sep 2013 21:08:22 -0400
Message-ID: <CACMdL5Lj9xszu_rtZ8-t7a-t9EQtEpv3ZxK73MQvOVueU_BbOQ@mail.gmail.com>
Subject: Gnat with sqlite Ada bindings - 100% CPU problem
From: Patrick Herbst <paherbst AT gmail DOT com>
To: cygwin AT cygwin DOT com

Hello,

I'm trying to write an Ada application that uses the Sqlite library.
The application will compile and run until the end of the application
where it will hang, using near 100% CPU.

When I cntrl+c it while running in GDB, it shows:
Program received signal SIGINT, Interrupt.
0x6e015096 in cyggcc_s-1!__deregister_frame_info_bases () from
/usr/bin/cyggcc_s-1.dll

The same application in C exits just fine.

I generated the Ada bindings using
> gcc -fdump-ada-spec /usr/include/sqlite3.h

and my application is as follows
-----------------------------
with sqlite3_h;
with system;
with text_io;
with Interfaces.C.Strings;

procedure test is

  Db : System.Address;
  Name : Interfaces.C.Strings.chars_ptr :=
      Interfaces.C.Strings.New_String ("./test.db");
  ret : interfaces.c.int;

begin

  ret := sqlite3_h.sqlite3_open (Name, Db'address);
  ret := sqlite3_h.sqlite3_close (Db);

  Interfaces.C.Strings.Free (Name);

  text_io.put_line ("Done");

end test;
-----------------------------

Compile using
> gnatmake ./test.adb -largs -lsqlite3

Running the application will print out "Done" and then hang with 100%
CPU.  Not sure if this is a bug with cygwin or gcc.

Any suggestions/help would be greatly appreciated!

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019