Giter VIP home page Giter VIP logo

Comments (5)

matthiaskrgr avatar matthiaskrgr commented on August 23, 2024 1

#122385 fyi @lcnr

from rust.

matthiaskrgr avatar matthiaskrgr commented on August 23, 2024

There is also a ProofTreeVisitor issue causing an ICE when compiling alloc which I will handle in a separate PR.

this is probably the same problem here.
When compiling ./library/alloc/src/lib.rs" with 2021, we run into Sorts(ExpectedFound { expected: string::String, found: str }) but I have not bothered trying to reduce that 😅

from rust.

lqd avatar lqd commented on August 23, 2024

The original code already produces that ICE (so I guess that via specialization-overlap-projection.rs this is already a known issue?), and is a check-pass test. In these situations, your reduction procedure could just check that the flag is the cause of the error first, and then minimize the code.

That is, instead of reducing with a condition like rustc code.rs -Znext-solver=coherence &| grep ICE, using a condition like rustc code.rs && rustc code -Znext-solver=coherence &| grep ICE.

This would keep the *-pass property, and fuzz deeper within rustc by not being limited by unrelated basic syntax errors in general. I mean, unless you're fuzzing diagnostics or failure paths in particular for *-fail tests, which is useful in its own right. Otherwise, the procedure still has a bias towards that, but it's not intentional, and coverage is reduced.

#![feature(specialization)]

trait Assoc {
    type Output;
}

impl<T> Assoc for T {
    default type Output = bool;
}

impl Assoc for u16 { type Output = u16; }

trait Foo {}
impl Foo for u32 {}
impl Foo for <u16 as Assoc>::Output {}

fn main() {}

from rust.

matthiaskrgr avatar matthiaskrgr commented on August 23, 2024

There is no fuzzing involved here.
The ICE was detected on the original straight form the rustc repo and the responsible compiler flag was found (all unrelated compiler flags are dismissed).
Then with the reduced set of flags, I run https://github.com/langston-barrett/treereduce to automatically reduce the file, as long as the ice still triggers with the reduced set of flags and this becomes reduced snippet from which I generate the markdown report.

from rust.

lqd avatar lqd commented on August 23, 2024

Right I'm saying this can be suboptimal as it introduces new unrelated errors. It turned something that worked without the flag and ICEd with it, into something that fails without the flag and still ICEs with the flag. This can be prevented during reduction.

The reduced snippet would have to be fixed to remove the unrelated errors when fixing the ICE, or worse it could be ignored in favor of the original unreduced piece of code.

from rust.

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.