Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fails on OS X #42

Closed
varnerac opened this issue Aug 10, 2015 · 2 comments
Closed

Test fails on OS X #42

varnerac opened this issue Aug 10, 2015 · 2 comments

Comments

@varnerac
Copy link

When running tests against master I get the following:

======================== EUnit ========================
module 'sqlite3_test'
  sqlite3_test: all_test_ (basic_functionality)...[0.002 s] ok
  sqlite3_test: all_test_ (table_info)...[0.001 s] ok
  sqlite3_test: all_test_ (parametrized)...[0.002 s] ok
  sqlite3_test: all_test_ (negative)...[0.001 s] ok
  sqlite3_test: all_test_ (blob)...[0.001 s] ok
  sqlite3_test: all_test_ (escaping)...[0.001 s] ok
  sqlite3_test: all_test_ (select_many_records)...[0.030 s] ok
  sqlite3_test: all_test_ (nonexistent_table_info)...[0.001 s] ok
  sqlite3_test: all_test_ (large_number)...[0.001 s] ok
  sqlite3_test: all_test_ (unicode)...[0.001 s] ok
  sqlite3_test: all_test_ (acc_string_encoding)...[0.001 s] ok
  sqlite3_test: all_test_ (large_offset)...[0.001 s] ok
  sqlite3_test: all_test_ (issue23)...[0.002 s] ok
  sqlite3_test: all_test_ (issue13)...[0.001 s] ok
  sqlite3_test: all_test_ (enable_load_extension)...ok
  sqlite3_test: all_test_ (changes)...[0.001 s] ok
  sqlite3_test: anonymous_test...Assertion failed: (0), function hash, file /SourceCache/cmph/cmph-1/src/hash.c, line 35.
make: *** [test] Abort trap: 6

I think this code block is causing it, which you can find around line 25352 in sqlite3.c in the amalgamation.

/* Remove all entries from a hash table.  Reclaim all memory.
** Call this routine to delete a hash table or to reset a hash table
** to the empty state.
*/
void sqlite3HashClear(Hash *pH){
  HashElem *elem;         /* For looping over all elements of the table */

  assert( pH!=0 );
@alexeyr
Copy link
Owner

alexeyr commented Aug 10, 2015

The only unusual thing anonymous does is creating a database with an empty name, which should work:

If the filename is an empty string, then a private, temporary on-disk database will be created

Can you try calling sqlite3_open("", &db) and then closing it directly from a C program?

mrcsparker added a commit to mrcsparker/erlang-sqlite3 that referenced this issue Feb 22, 2016
Mac OS X hash.c issue.
@varnerac
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants