-
Notifications
You must be signed in to change notification settings - Fork 43
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 failures on big endian #36
Comments
Thanks for info @nijel , can you run t_json test on one of this architecture with this patch?: diff --git a/src/stardict_lib.cpp b/src/stardict_lib.cpp
index 63e23f5..7f222fd 100644
--- a/src/stardict_lib.cpp
+++ b/src/stardict_lib.cpp
@@ -539,6 +539,7 @@ inline const gchar *OffsetIndex::read_first_on_page_key(glong page_idx)
const size_t nitems = fread(wordentry_buf,
std::min(sizeof(wordentry_buf), static_cast<size_t>(page_size)),
1, idxfile);
+ fprintf(stderr, "%p %lld %llu %zu %p %zu\n", idxfile, (long long)page_idx, (long long unsigned)page_size, nitems, wordentry_buf, sizeof(wordentry_buf));
THROW_IF_ERROR(nitems == 1);
//TODO: check returned values, deal with word entry that strlen>255.
return wordentry_buf; |
Probably yes, I will look into this next week. |
From the gdb session:
IMHO it seems that page_size is wrong... |
The problem is in cache loading, following workaround works: diff --git a/src/stardict_lib.cpp b/src/stardict_lib.cpp
index 63e23f5..1c91fe3 100644
--- a/src/stardict_lib.cpp
+++ b/src/stardict_lib.cpp
@@ -561,6 +561,7 @@ inline const gchar *OffsetIndex::get_first_on_page_key(glong page_idx)
bool OffsetIndex::load_cache(const std::string &url)
{
const std::list<std::string> vars = get_cache_variant(url);
+ return false;
for (const std::string &item : vars) {
struct ::stat idxstat, cachestat; |
Okay the problem is that the cache loading code doesn't detect as invalid caches created on other architecture and testsuite ships |
Should be fixed by #38 |
Both fail with:
Problematic code:
sdcv/src/stardict_lib.cpp
Lines 535 to 545 in 925a4bc
The text was updated successfully, but these errors were encountered: