Skip to content
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

Bug in test: test_valid_log_utf16_max_log_len_not_even #1542

Closed
mikhailOK opened this issue Oct 23, 2019 · 0 comments
Closed

Bug in test: test_valid_log_utf16_max_log_len_not_even #1542

mikhailOK opened this issue Oct 23, 2019 · 0 comments
Assignees

Comments

@mikhailOK
Copy link
Contributor

The test is non-deterministic
Failure here: https://gitlab.com/near-protocol/nearcore/-/jobs/330912562

Bug here:

    let string = "ab";
    let mut utf16_bytes: Vec<u8> = vec![0u8; 0];
    for u16_ in string.encode_utf16() {
        utf16_bytes.push(u16_ as u8);
        utf16_bytes.push((u16_ >> 8) as u8);
    }
    logic.log_utf16(std::u64::MAX, utf16_bytes.as_ptr() as _).expect("Valid utf-16 string_bytes");

log-utf16 with MAX passed as length expects a string terminated by two null bytes, but the test passes a buffer with no terminator

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

No branches or pull requests

3 participants