Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Verifier crashes on a call to a varargs method with two or more arguments

Offen
#349 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
java
Bereich
compilers

Rechercherichtung

Start by running the minimal reproducer in main and trace how the verifier checks the count("a", "b") invocation against the varargs method. The issue does not name a source file or test, so locate the invocation-checking code and its existing tests. Done means the reproducer prints Correct! Passed Verification. instead of crashing.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug

Impact: verification stops with an internal error. Found while building a test fixture; no example blocked yet.

Description

Calling a user-defined varargs method with two or more arguments crashes (Index 1 out of bounds for length 1): the arguments are matched one-to-one with the single array parameter.

Minimal reproducer

public class Repro {
    static int count(String... names) {
        return names.length;
    }

    public static void main(String[] args) {
        int n = count("a", "b");
        System.out.println(n);
    }
}

Expected

Correct! Passed Verification.

Actual

Exception in thread "main" java.lang.RuntimeException: 
Error while checking CtMethodImpl
  on main(String[] args) { 
  with 
Error while checking CtBlockImpl
  on { 
  with 
Error while checking CtLocalVariableImpl
  on n = count("a", "b"); 
  with 
Error while checking CtInvocationImpl
  on count("a", "b"); 
  with Index 1 out of bounds for length 1
Caused by: java.lang.RuntimeException: 

Reproduced on main at 0472025e (liquidjava-verifier 0.0.35); also on fbfb4e23 and 0.0.33 in the original form.

Context

Found while turning bugs mined from real open-source Java (fixed upstream or still present) into study examples for the error-message study.

Vorherrschende Sprache
Java
Sterne
67
Forks
36
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
29

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus liquid-java/liquidjava

Alle Issues in liquid-java/liquidjava

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.