Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[K-Bug] LLVM Backend crash when comparing MInt

Aperta
#4,760 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@dwightguth ci sta già lavorando.

Dal 3/3/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

What component is the issue in?

llvm-backend

Which command
  • kompile
  • kast
  • krun
  • kprove
  • kprovex
  • ksearch
What K Version?

v7.1.217-0-gf236685fdd

Operating System

Linux

K Definitions (If Possible)
module A
  imports BOOL
  imports INT
  imports K-EQUAL-SYNTAX
  imports MINT

  syntax MInt{8}

  syntax KItem ::= "a" | b(MInt{8}, MInt{8}) | c(Bool)

  rule a => b(Int2MInt(2), Int2MInt(2))
  rule b(X, Y) => c(X ==K Y)
endmodule
Steps to Reproduce
kompile a.k
echo "a" >> a.in
krun a.in

This crashes with

.../lib/kframework/k-util.sh: line 114: 399174 Aborted                 (core dumped) "$@"
[Error] krun: ./a-kompiled/interpreter 

GDB has this in the stack trace:

#4  0x00007ffff70287f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x0000555555683f4e in hook_KEQUAL_eq (arg1=0x7e00000001a8, arg2=0x7e00000001d0)
    at /mnt/data/runtime-verification/k/llvm-backend/src/main/native/llvm-backend/runtime/collections/kelemle.cpp:161
#6  0x0000555555683eb9 in hook_KEQUAL_eq (arg1=0x7e00000001b8, arg2=0x7e00000001e0)
    at /mnt/data/runtime-verification/k/llvm-backend/src/main/native/llvm-backend/runtime/collections/kelemle.cpp:112
#7  0x00005555555c5972 in k_step ()

This is the code that seems to be crashing:
https://github.com/runtimeverification/llvm-backend/blob/4203a45110504a6661ca086816e28dafa9e7ac54/runtime/collections/kelemle.cpp#L156-L166

Expected Results

Not crashing. The <k> cell should contain c(true).

Lingua principale
Python
Stelle
591
Fork
163
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di runtimeverification/k

Tutte le issue di runtimeverification/k

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.