Gnat with sqlite Ada bindings - 100% CPU problem

Patrick Herbst
Tue Sep 17 01:45:00 GMT 2013


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

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 :;


  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:
Unsubscribe info:

More information about the Cygwin mailing list