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

Fix LLVM assert when handling bad intrinsic monomorphizations #32649

Merged
merged 1 commit into from
Apr 7, 2016

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Mar 31, 2016

Passing an invalid type to certain intrinsics would trigger an LLVM assert even though the invalid type was caught by the compiler.

r? @eddyb

@eddyb
Copy link
Member

eddyb commented Mar 31, 2016

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 31, 2016

📌 Commit ecc0bd2 has been approved by eddyb

bors added a commit that referenced this pull request Apr 2, 2016
Rollup of 11 pull requests

- Successful merges: #32622, #32629, #32640, #32641, #32642, #32645, #32647, #32649, #32652, #32654, #32656
- Failed merges:
@Manishearth
Copy link
Member

@bors r-; feel free to re-r when the test is fixed

http://buildbot.rust-lang.org/builders/auto-linux-64-opt-mir/builds/181/steps/test/logs/stdio


failures:

---- [compile-fail] compile-fail/bad-intrinsic-monomorphization.rs stdout ----

error: unexpected compiler message: '/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:26:1: 29:2 error: invalid monomorphization of `cttz` intrinsic: expected basic integer type, found `Foo` [E0511]'

error: unexpected compiler message: '/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:31:1: 34:2 error: invalid monomorphization of `fadd_fast` intrinsic: expected basic float type, found `Foo` [E0511]'

error: unexpected compiler message: '/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:36:1: 39:2 error: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `Foo` [E0511]'

error: expected error on line 27 not found: `cttz` intrinsic: expected basic integer type, found `Foo`

error: expected error on line 32 not found: `fadd_fast` intrinsic: expected basic float type, found `Foo`

error: expected error on line 37 not found: `simd_add` intrinsic: expected SIMD input type, found non-SIMD `Foo`

error: 3 unexpected errors found, 3 expected errors not found
status: exit code: 101
command: x86_64-unknown-linux-gnu/stage2/bin/rustc /buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs -L x86_64-unknown-linux-gnu/test/compile-fail/ --target=x86_64-unknown-linux-gnu -L x86_64-unknown-linux-gnu/test/compile-fail/bad-intrinsic-monomorphization.stage2-x86_64-unknown-linux-gnu.compile-fail.libaux -C prefer-dynamic -o x86_64-unknown-linux-gnu/test/compile-fail/bad-intrinsic-monomorphization.stage2-x86_64-unknown-linux-gnu --cfg rtopt -Z orbit -C rpath -O -L x86_64-unknown-linux-gnu/rt
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:26:1: 29:2 error: invalid monomorphization of `cttz` intrinsic: expected basic integer type, found `Foo` [E0511]
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:26 unsafe fn test_cttz(v: Foo) -> Foo {
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:27     intrinsics::cttz(v)
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:28     //~^ ERROR `cttz` intrinsic: expected basic integer type, found `Foo`
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:29 }
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:26:1: 29:2 help: run `rustc --explain E0511` to see a detailed explanation
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:31:1: 34:2 error: invalid monomorphization of `fadd_fast` intrinsic: expected basic float type, found `Foo` [E0511]
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:31 unsafe fn test_fadd_fast(a: Foo, b: Foo) -> Foo {
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:32     intrinsics::fadd_fast(a, b)
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:33     //~^ ERROR `fadd_fast` intrinsic: expected basic float type, found `Foo`
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:34 }
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:31:1: 34:2 help: run `rustc --explain E0511` to see a detailed explanation
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:36:1: 39:2 error: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `Foo` [E0511]
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:36 unsafe fn test_simd_add(a: Foo, b: Foo) -> Foo {
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:37     simd_add(a, b)
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:38     //~^ ERROR `simd_add` intrinsic: expected SIMD input type, found non-SIMD `Foo`
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:39 }
/buildslave/rust-buildbot/slave/auto-linux-64-opt-mir/build/src/test/compile-fail/bad-intrinsic-monomorphization.rs:36:1: 39:2 help: run `rustc --explain E0511` to see a detailed explanation
error: aborting due to 3 previous errors

------------------------------------------

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 6, 2016
…assert, r=eddyb

Fix LLVM assert when handling bad intrinsic monomorphizations

Passing an invalid type to certain intrinsics would trigger an LLVM assert even though the invalid type was caught by the compiler.

r? @eddyb
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 6, 2016
…assert, r=eddyb

Fix LLVM assert when handling bad intrinsic monomorphizations

Passing an invalid type to certain intrinsics would trigger an LLVM assert even though the invalid type was caught by the compiler.

r? @eddyb
@Amanieu Amanieu force-pushed the intrinsic_monomorphization_assert branch from ecc0bd2 to 4d71712 Compare April 6, 2016 17:49
@Amanieu
Copy link
Member Author

Amanieu commented Apr 6, 2016

Fixed

@eddyb
Copy link
Member

eddyb commented Apr 6, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Apr 6, 2016

📌 Commit 4d71712 has been approved by eddyb

@steveklabnik
Copy link
Member

@bors: r-
@bors: rollup-

this apparently failed the rollup #32772 (comment)

@Amanieu
Copy link
Member Author

Amanieu commented Apr 6, 2016

@steveklabnik I've fixed the issue already

@alexcrichton
Copy link
Member

@bors: r=eddyb 4d71712

@bors
Copy link
Contributor

bors commented Apr 7, 2016

⌛ Testing commit 4d71712 with merge 455fa01...

bors added a commit that referenced this pull request Apr 7, 2016
…ddyb

Fix LLVM assert when handling bad intrinsic monomorphizations

Passing an invalid type to certain intrinsics would trigger an LLVM assert even though the invalid type was caught by the compiler.

r? @eddyb
@bors bors merged commit 4d71712 into rust-lang:master Apr 7, 2016
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.

6 participants