Skip to content

Rebase MD5 module against upstream#1065

Merged
NiLuJe merged 4 commits intokoreader:masterfrom
NiLuJe:md5-resync
Mar 16, 2020
Merged

Rebase MD5 module against upstream#1065
NiLuJe merged 4 commits intokoreader:masterfrom
NiLuJe:md5-resync

Conversation

@NiLuJe
Copy link
Copy Markdown
Member

@NiLuJe NiLuJe commented Mar 14, 2020

(Same upstream as luxl, which is why I fell into this rabbit hole).

My vague hope that this might fix the mysterious Clang bot issues have been crushed.
On the other hand, it doesn't seem to break anything, so, eh.


This change is Reviewable

NiLuJe added 4 commits March 14, 2020 06:28
Also, minor cleanups.
Enforce unsigned chars everywhere.
Update bin2str

FWIW, I'm not sure what the masking was about as buf is an uint32_t?
It never was in upstream's code.

Will everything blow up?
Will it magically fix the mysterious Clang failures?
Noone knows!
Copy link
Copy Markdown
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, looks functionally identical

---- @treturn string md5 sum in Lua string
function md5_proto:sum(luastr)
local buf = ffi.new("char[33]")
local buf = ffi.new("unsigned char[33]")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doubtful that it would affect anything, I actually quite explicitly played around with this very change because I wondered if putting in an unsigned might help.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unsigned on arm anyway ;).

(And mostly always explicitly an uint8_t in upstream's examples).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I'm just saying I did a few x86_64 experiments in Docker none of which made a difference on Clang-built LuaJIT. ;-) Regardless of cross-platform compatibility/best practices/etc., just to see if I could isolate something, anything at all.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still especially confusing to me that locally it's a toss up or possibly as low as 1 in 4 that the problem occurs, while in the CI it's assured to go wrong.

Copy link
Copy Markdown
Member Author

@NiLuJe NiLuJe Mar 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think I sometimes saw only 2 of the tests failing instead of the usual three during last night's runs. :?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it does? Huh, I've always seen all three on CircleCI.

@Frenzie
Copy link
Copy Markdown
Member

Frenzie commented Mar 14, 2020

Hold up, this looks new? O_o

[ RUN      ] ./spec/base/unit/koptcontext_spec.lua @ 171: KOPTContext module should convert koptcontext to/from table
error: Unable to read ICC workflow
warning: Attempt to read Output Intent failed
./spec/base/unit/koptcontext_spec.lua:180: Expected objects to be the same.
Passed in:
(string) ''
Expected:
(string) 'eng'

stack traceback:

@NiLuJe
Copy link
Copy Markdown
Member Author

NiLuJe commented Mar 14, 2020

Nope, that one has been happening sporadically since as far back as I can remember ;).

(I can even reproduce that one locally :D).

@NiLuJe NiLuJe merged commit 6536d03 into koreader:master Mar 16, 2020
NiLuJe added a commit to NiLuJe/koreader-base that referenced this pull request Apr 13, 2020
Regression since koreader#1065

Probably because of implicit type conversions to/from Lua
and the fact that Lua numbers are double internally?
Or something.
NiLuJe added a commit to NiLuJe/koreader-base that referenced this pull request Apr 13, 2020
Regression since koreader#1065

Probably because of implicit type conversions to/from Lua
and the fact that Lua numbers are double internally?
Or something.
@NiLuJe NiLuJe mentioned this pull request Apr 13, 2020
Frenzie pushed a commit that referenced this pull request Apr 14, 2020
Regression since #1065

Probably because of implicit type conversions to/from Lua
and the fact that Lua numbers are double internally?
Or something.
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

Successfully merging this pull request may close these issues.

2 participants