Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[K-Bug] LLVM Backend crash when comparing MInt

オープン
#4,760 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@dwightguth がすでに取り組んでいます。

2025年3月3日 から。

評価

この issue はまだ評価されていません。

説明

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).

主要言語
Python
スター
591
フォーク
163
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

runtimeverification/k のほかの issue

runtimeverification/k の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。