Giter Club home page Giter Club logo

Comments (6)

RalfJung avatar RalfJung commented on August 20, 2024 1

This now prints

warning: the feature `link_llvm_intrinsics` is internal to the compiler or standard library
 --> src/main.rs:1:12
  |
1 | #![feature(link_llvm_intrinsics, simd_ffi)]
  |            ^^^^^^^^^^^^^^^^^^^^
  |
  = note: using it is strongly discouraged
  = note: using it is strongly discouraged
  = note: `#[warn(internal_features)]` on by default

FWIW with a regular rustc build it doesn't even ICE, it hits an LLVM assertion. So I don't think there is anything else we want to do in the Miri side here.

rust-lang/rust#116217 tracks the ICE message.

from miri.

RalfJung avatar RalfJung commented on August 20, 2024

We generally ICE when intrinsics are used the wrong way. I don't think we should make an exception for SIMD intrinsics.

link_llvm_intrinsics sounds like a feature on par with feature(intrinsics): if you use it wrong, don't expect the compiler to give nice error messages.

from miri.

saethlin avatar saethlin commented on August 20, 2024

Hm. My concern is that we attach this text to an ICE:

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/miri/issues/new

Which is not appropriate if the ICE is actually user error.

from miri.

RalfJung avatar RalfJung commented on August 20, 2024

Yeah, that text is wrong when intrinsics are involved (and possibly with other internal features as well), see e.g. this example.

I'm fairly sure it's also possible to ICE rustc by misusing intrinsics, so this is not really a Miri issue.

from miri.

RalfJung avatar RalfJung commented on August 20, 2024

Here's a rustc ICE that's not-a-bug due to being related to intrinsics.

We should clarify the message printed on an ICE (but getting access to enough state to figure out if any internal feature was enabled might be tricky). But that's a rustc issue, not a Miri issue.

from miri.

saethlin avatar saethlin commented on August 20, 2024

Thanks! I agree that making this an internal feature is a good improvement.

from miri.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.