You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of protobuf and what language are you using?
Version: 3.15.8
Language: Ruby 2.7.3, 3.0.1
What operating system (Linux, Windows, ...) and version?
Windows Server 2019 (10.0.17763), via the "windows-latest" platform on GitHub Actions.
What runtime / compiler are you using (e.g., python version or gcc version)
n/a (using the binary gem release)
What did you do?
require"google/protobuf"Google::Protobuf::DescriptorPool.generated_pool.builddoadd_file("windoze.proto",:syntax=>:proto3)doadd_message"windoze.SimpleTest"do# Note: No fields necessaryendendendmoduleWindozeSimpleTest= ::Google::Protobuf::DescriptorPool.generated_pool.lookup("windoze.SimpleTest").msgclassendmessage=Windoze::SimpleTest.newputsmessage.hash
What did you expect to see
An integer hash value displayed
What did you see instead?
The Ruby VM terminates with the following assertion coming from C code:
[BUG] Unnormalized Fixnum value 0xbb5cc1f7724449a5
Anything else we should know about your project / environment
I found this while investigating #8554. The assertion is coming from here and seems to happen if the value claims to be a Fixnum but doesn't fall within the range of the long type. Thus, it could trigger on 64-bit Windows where longs are 32 bits, if the Fixnum is set from a 64-bit value. This is indeed the case in Message_hash, which takes a 64-bit integer from wyhash, and crams it directly into INT2FIX.
This does not seem to trigger on Linux or MacOS, which is unsurprising because long is 64-bit on those platforms.
The text was updated successfully, but these errors were encountered:
What version of protobuf and what language are you using?
Version: 3.15.8
Language: Ruby 2.7.3, 3.0.1
What operating system (Linux, Windows, ...) and version?
Windows Server 2019 (10.0.17763), via the "windows-latest" platform on GitHub Actions.
What runtime / compiler are you using (e.g., python version or gcc version)
n/a (using the binary gem release)
What did you do?
What did you expect to see
An integer hash value displayed
What did you see instead?
The Ruby VM terminates with the following assertion coming from C code:
Anything else we should know about your project / environment
I found this while investigating #8554. The assertion is coming from here and seems to happen if the value claims to be a Fixnum but doesn't fall within the range of the
long
type. Thus, it could trigger on 64-bit Windows where longs are 32 bits, if the Fixnum is set from a 64-bit value. This is indeed the case inMessage_hash
, which takes a 64-bit integer from wyhash, and crams it directly intoINT2FIX
.This does not seem to trigger on Linux or MacOS, which is unsurprising because
long
is 64-bit on those platforms.The text was updated successfully, but these errors were encountered: