ArkScript-lang / ArkScript-lang/Ark

Failing to run when loading an incompatible plugin

Offen
#259 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
❗️ priority/medium 🔥 bug ark/virtual machine
Vorherrschende Sprache
C++
Sterne
728
Forks
54
Ø Merge
4 Std. 8 Min.
Gemergte PRs (30 T.)
2

Beschreibung

In the VM, we have an instruction to load plugins (.dll, .so and .dynlib, depending on the OS), working perfectly when Ark *and* the plugin have been compiled with the same compiler *and* the same compilation options (both debug or both release).

A problem occurs when we use a debug plugin with a release ark: ark silently fails to load it, throwing an exception we aren't catching / interpreting as "bad plugin".

This should be investigated to be able to tell the user that the plugin couldn't be loaded, and we should abort execution (no plugin loaded => undefined symbols later on, coming from the plugin we didn't load, thus can not execute: better to abort to give a clear error message).

This problem will mostly be encountered by our contributors and development team, as our end users are only being provided the final binaries, which we should test before publishing. When developing we sometimes forget to recompile everything, and it's really annoying because we start searching for a bug in the VM while it's just a target to recompile.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginnen Sie im VM-Code, der die Anweisung zum Laden von .dll-, .so- und .dynlib-Plugins implementiert. Reproduzieren Sie das Laden eines debug-Plugins mit einem release Ark, verfolgen Sie dann die nicht abgefangene Ausnahme und definieren Sie den Fehlerpfad so, dass ein inkompatibles Plugin einen klaren Fehler erzeugt und die Ausführung abbricht, anstatt später undefinierte Symbole zu hinterlassen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp
Bereich
compilers
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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