Skip to content

block-buffer crashes in digest_blocks on windows 32-bit #989

@bridiver

Description

@bridiver

We recently started seeing a crash only on win x86 and only in release build configurations. This happens on 0.10 and 0.9 in slightly different places. On 0.9 it's src\lib.rs:214 and 0.10 it's src\lib.rs:143
In both cases it triggers EXCEPTION_ILLEGAL_INSTRUCTION
If we change the debug_asserts to asserts it panics with

thread '<unnamed>' panicked at .\../../third_party/rust/block_buffer/v0_10/crate/src/lib.rs:198:13:
assertion failed: false

all other platforms/archs (mac, linux, android, win x64, etc..) run fine and win x86 also runs fine when not in release config

The value of self.pos is a high random number when self.size()==128 here https://github.com/brave/brave-core/blob/16cbd11281e8e37da88f6279f07016db74215852/third_party/rust/block_buffer/v0_9/crate/src/lib.rs#L214

with added assert on 0.9

thread '<unnamed>' panicked at .\../../third_party/rust/block_buffer/v0_9/crate/src/lib.rs:217:9:
self.size() = 128, self.pos = 4294967295

value of self.pos is different each for the same test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions