-
Notifications
You must be signed in to change notification settings - Fork 178
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
Very recent UTF-16 issue? Not.sure. #2704
Comments
Thanks for the report.
|
Re why it passed 17 hours ago is because the truffleruby dev builds did not work for a while due to some issue that is now fixed, and so it was using a dev build before the adoption of TruffleString. |
Yeah. Will work on it. |
The issue seems https://github.com/sparklemotion/sqlite3-ruby/blob/94b7447b016b6eabb0d91d68ee73478b7db313f0/ext/sqlite3/database.c#L34 |
I'm not sure why |
Thanks. IDK. I saw the change, (recent pass to recent fail), and all the other platforms were passing in both CI runs. As some point, right/wrong, good/bad isn't the issue, it's about compatibility. I was just running CI because the Windows mswin build wasn't working (fixed), and then MSYS2 and vcpkg updated their sqlite3/sqlcipher packages, so I wanted to check the updates. Or, I'm not that familiar with SQLite3... |
* TruffleRuby uses TruffleString which requires all UTF-16 strings to always have an even bytesize. * The code here ensures the UTF-16 string always ends up with 2 \x00 bytes, so append them explicitly to have an even bytesize instead of relying on RSTRING_PTR() adding the second \x00 byte. * Fixes oracle/truffleruby#2704
I now see @eregon's comment about about the dev builds. |
* So whether the string is UTF-32, UTF-16 or another encoding there are a safe amount of \0 bytes when passed to C functions. * See #2704 (comment)
* So whether the string is UTF-32, UTF-16 or another encoding there are a safe amount of \0 bytes when passed to C functions. * See oracle#2704 (comment)
* So whether the string is UTF-32, UTF-16 or another encoding there are a safe amount of \0 bytes when passed to C functions. * See oracle#2704 (comment)
About 17 hours ago a CI run in sqlite3-ruby passed. There has been an update in a Window's vcpkg used for the CI, and I just ran it in my fork a moment ago. Both were on current master. TruffleRuby failed in my fork build.
Passing version:
truffleruby 22.3.0-dev-925274f4, like ruby 3.0.3, GraalVM CE Native [x86_64-linux]
Failing version:
truffleruby 22.3.0-dev-6e384700, like ruby 3.0.3, GraalVM CE Native [x86_64-linux]
Text of the errors below:
Everything else seems to match in the CI runs. Reporting only, not a bug affecting me...
The text was updated successfully, but these errors were encountered: