-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Segment fault when custom build with gcc. #26
Comments
Another thing, I found that the AES code is compiled to the target file even if no SqlCipher, AES128, AES256 flags set. |
At first glance, the list of compile-time options looks ok.
Well, the debugger output line # 1 shows The problem is that I really don't understand how you could get this value for the cipher type, unless you modified the source code. The default cipher type is
Your remark is too general to allow to understand what might go wrong. There are so many packages out there which are based on SQLite in one form or the other, that I certainly can't know all of them. Minor adjustment are frequently necessary. So, please be a bit more specific.
I have to admit that the precompiler statements excluding certain parts of the code were contributed by another user. Obviously they do not cleanly separate the code parts related to sqleet and sqlcipher. That is, if sqleet or sqlcipher is enabled the other cipher is included, too. Yes, I agree that could be solved better. |
I think the problem is at cipher lookup, when aes excluded from build. There are two arrays for default cipher parameters and cipher define. The code seems works if I didn't pass cipher in url. |
I will look into the issue early next week. |
If cipher schemes 'aes128cbc' and/or 'aes256cbc' are excluded from the build, selecting the cipher via URI parameter leads to a crash, because a wrong (excluded) cipher is selected due to using the wrong cipher index.
Thanks for reporting the issue. I have applied a fix now. The issue affects only builds which exclude cipher schemes from the build process. A release including the fix will follow shortly after the release of the next SQLite version (expected end of March according to the current SQLite draft release log). |
Release of SQLite3 Multiple Ciphers version 1.2.0 done ... closing. |
I am trying to use this project with
emcc
, got segment fault when compiling with following command:Debugging with
gdb --args ./out/sqlite3.o 'file:./test.db?cipher=chacha20&key=test'
, I got:The Makefile from sql-js/sql.js works great with sqleet, but not sqlite3mc.
The text was updated successfully, but these errors were encountered: