Skip to content

rustc 1.14 miscompiles canteen-0.3.5 #38424

@brson

Description

@brson

Against https://gitlab.com/jeffdn/rust-canteen, commit 1915cc10c4f3f18e03456908710926e2a23bca10

With rustc:

rustc 1.14.0-beta.4 (ce61a71a7 2016-12-15)
binary: rustc
commit-hash: ce61a71a7726aef6b33aa0c9cffff0661d52212c
commit-date: 2016-12-15
host: x86_64-unknown-linux-gnu
release: 1.14.0-beta.4
LLVM version: 3.9
~/dev/rust-canteen⟫ cargo +beta test
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading threadpool v1.3.2
 Downloading rustc-serialize v0.3.22
 Downloading chrono v0.2.25
 Downloading miow v0.1.4
   Compiling regex-syntax v0.3.9
   Compiling rustc-serialize v0.3.22
   Compiling cfg-if v0.1.0
   Compiling bytes v0.3.0
   Compiling log v0.3.6
   Compiling winapi-build v0.1.1
   Compiling kernel32-sys v0.2.2
   Compiling winapi v0.2.8
   Compiling utf8-ranges v0.1.3
   Compiling threadpool v1.3.2
   Compiling bitflags v0.4.0
   Compiling libc v0.2.18
   Compiling slab v0.1.3
   Compiling nix v0.5.1
   Compiling thread-id v2.0.0
   Compiling time v0.1.35
   Compiling memchr v0.1.11
   Compiling thread_local v0.2.7
   Compiling aho-corasick v0.5.3
   Compiling net2 v0.2.26
   Compiling regex v0.1.80
   Compiling num-traits v0.1.36
   Compiling ws2_32-sys v0.2.1
   Compiling num-integer v0.1.32
   Compiling miow v0.1.4
   Compiling num-iter v0.1.32
   Compiling num v0.1.36
   Compiling chrono v0.2.25
   Compiling mio v0.5.1
   Compiling canteen v0.3.5 (file:///mnt2/dev/rust-canteen)
    Finished debug [unoptimized + debuginfo] target(s) in 29.86 secs
     Running target/debug/deps/canteen-72b3608ca48352f4

running 22 tests
test request::tests::test_fromuri_trait_float ... ok
test request::tests::test_fromuri_trait_i32 ... ok
test request::tests::test_fromuri_trait_string ... ok
test request::tests::test_fromuri_trait_u32 ... ok
test request::tests::test_get_json ... ok
test request::tests::test_get_fromuri_i32 ... ok
test request::tests::test_get_json_obj ... ok
test response::tests::test_tooutput_trait_static_str ... ok
test response::tests::test_response_http_message ... ok
test response::tests::test_tooutput_trait_str ... ok
test response::tests::test_tooutput_trait_string ... ok
test response::tests::test_response_as_json ... FAILED
test response::tests::test_tooutput_trait_vec ... ok
test route::tests::test_route_match_simple ... ok
test route::tests::test_route_match_fail ... ok
test route::tests::test_route_match_many ... ok
test route::tests::test_route_match_single_int ... ok
test utils::tests::test_conv_systemtime ... ok
test route::tests::test_route_match_single_str ... ok
test utils::tests::test_replace_escape ... ok
test route::tests::test_find_route_native_types ... ok
test route::tests::test_route_match_single_uint ... ok

failures:

---- response::tests::test_response_as_json stdout ----
        thread 'response::tests::test_response_as_json' panicked at 'assertion failed: `(left == right)` (left: `[72, 84, 84, 80, 47, 49, 46, 49, 32, 50, 48, 48, 32, 79, 75, 13, 10, 83, 101, 114, 118, 101, 114, 58, 32, 99, 97, 110, 116, 101, 101, 110, 47, 48, 46, 51, 46, 53, 13, 10, 68, 97, 116, 101, 58, 32, 83, 97, 116, 44, 32, 49, 55, 32, 68, 101, 99, 32, 50, 48, 49, 54, 44, 32, 48, 50, 58, 53, 54, 58, 52, 57, 32, 85, 84, 67, 13, 10, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 58, 32, 99, 108, 111, 115, 101, 13, 10, 67, 111, 110, 116, 101, 110, 116, 45, 84, 121, 112, 101, 58, 32, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 106, 115, 111, 110, 13, 10, 67, 111, 110, 116, 101, 110, 116, 45, 76, 101, 110, 103, 116, 104, 58, 32, 49, 52, 13, 10, 13, 10, 123, 34, 105, 116, 101, 109, 34, 58, 49, 50, 51, 52, 53, 125]`, right: `[72, 84, 84, 80, 47, 49, 46, 49, 32, 50, 48, 48, 32, 79, 75, 13, 10, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 58, 32, 99, 108, 111, 115, 101, 13, 10, 83, 101, 114, 118, 101, 114, 58, 32, 99, 97, 110, 116, 101, 101, 110, 47, 48, 46, 51, 46, 53, 13, 10, 68, 97, 116, 101, 58, 32, 83, 97, 116, 44, 32, 49, 55, 32, 68, 101, 99, 32, 50, 48, 49, 54, 44, 32, 48, 50, 58, 53, 54, 58, 52, 57, 32, 85, 84, 67, 13, 10, 67, 111, 110, 116, 101, 110, 116, 45, 84, 121, 112, 101, 58, 32, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 106, 115, 111, 110, 13, 10, 67, 111, 110, 116, 101, 110, 116, 45, 76, 101, 110, 103, 116, 104, 58, 32, 49, 52, 13, 10, 13, 10, 123, 34, 105, 116, 101, 109, 34, 58, 49, 50, 51, 52, 53, 125]`)', src/response.rs:249
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    response::tests::test_response_as_json

test result: FAILED. 21 passed; 1 failed; 0 ignored; 0 measured

error: test failed

This does not happen on 1.13.

cc @jeffdn

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions