Repository Analysis

copy/v86

x86 PC emulator and x86-to-wasm JIT, running in the browser

2.4 Likely human-written View on GitHub
2.4
Adjusted Score
2.4
Raw Score
100%
Time Factor
2026-05-19
Last Push
23,077
Stars
JavaScript
Language
138,335
Lines of Code
336
Files
230
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 9HIGH 6MEDIUM 1LOW 214

Pattern Findings

230 matches across 9 categories. Click a row to expand file-level details.

Over-Commented Block207 hits · 194 pts
SeverityFileLineSnippet
LOWtests/qemu/compiler.h21#else
LOWtests/qemu/compiler.h41#endif
LOWtests/qemu/compiler.h61#ifndef container_of
LOWtests/qemu/compiler.h81 struct { \
LOWtests/qemu/compiler.h101# else
LOWtests/qemu/config-host.h1/* Automatically generated by create_config - do not modify */
LOWtests/qemu/config-host.h21 NULL
LOWtests/qemu/config-host.h41#define CONFIG_EPOLL_CREATE1 1
LOWtests/qemu/config-host.h61#define CONFIG_LINUX_MAGIC_H 1
LOWtests/qemu/test-i386.c21#include <assert.h>
LOWtests/qemu/test-i386.c41//#ifdef __SSE__
LOWtests/qemu/test-i386.c61
LOWtests/qemu/test-i386.c101#define OP xor
LOWtests/qemu/test-i386.c121#define OP inc
LOWtests/qemu/test-i386.c141#undef CC_MASK
LOWtests/qemu/test-i386.c161#include "test-i386-shift.h"
LOWtests/qemu/test-i386.c181#define OP bt
LOWtests/qemu/test-i386.c1901 printf("VM86 end\n");
LOWtests/kvm-unit-tests/x86/hyperv_connections.c1#include "libcflat.h"
LOWtests/kvm-unit-tests/x86/hyperv_synic.c1#include "libcflat.h"
LOWtests/kvm-unit-tests/x86/pmu.c1
LOWtests/kvm-unit-tests/x86/pmu.c21#define EVNTSEL_PC_SHIFT 19
LOWtests/kvm-unit-tests/x86/types.h1#ifndef __TYPES_H
LOWtests/kvm-unit-tests/x86/access.c21
LOWtests/kvm-unit-tests/x86/access.c81#define AC_PTE_ACCESSED_MASK (1 << AC_PTE_ACCESSED_BIT)
LOWtests/kvm-unit-tests/x86/ioram.h1#ifndef __IO_RAM_H
LOWtests/kvm-unit-tests/x86/svm.h101#define V_INTR_PRIO_MASK (0x0f << V_INTR_PRIO_SHIFT)
LOWtests/kvm-unit-tests/x86/svm.h181};
LOWtests/kvm-unit-tests/x86/svm.h201#define SVM_SELECTOR_L_MASK (1 << SVM_SELECTOR_L_SHIFT)
LOWtests/kvm-unit-tests/x86/svm.h221#define INTERCEPT_DR7_MASK (1 << 7)
LOWtests/kvm-unit-tests/x86/svm.h241#define SVM_EXITINTINFO_TYPE_EXEPT SVM_EVTINJ_TYPE_EXEPT
LOWtests/kvm-unit-tests/x86/svm.h261#define SVM_EXIT_READ_DR2 0x022
LOWtests/kvm-unit-tests/x86/svm.h281#define SVM_EXIT_CR0_SEL_WRITE 0x065
LOWtests/kvm-unit-tests/x86/svm.h301#define SVM_EXIT_INVLPG 0x079
LOWtests/kvm-unit-tests/x86/vmexit.c1#include "libcflat.h"
LOWtests/kvm-unit-tests/x86/hyperv.h1#ifndef __HYPERV_H
LOWtests/kvm-unit-tests/x86/hyperv.h21#define HV_X64_MSR_SVERSION 0x40000081
LOWtests/kvm-unit-tests/x86/hyperv.h41
LOWtests/kvm-unit-tests/x86/hyperv_stimer.c1#include "libcflat.h"
LOWtests/kvm-unit-tests/x86/vmx.h481 "xchg %%r11, regs+0x58\n\t" \
LOWtests/kvm-unit-tests/x86/vmx.h501
LOWtests/kvm-unit-tests/x86/vmx.h521#define EPT_MEM_TYPE_WP 5ul
LOWtests/kvm-unit-tests/x86/vmx.h541#define EPT_CAP_INVEPT (1ull << 20)
LOWtests/kvm-unit-tests/x86/vmx.h561#define EPT_VLT_RD 1
LOWtests/kvm-unit-tests/x86/vmx_tests.c1/*
LOWtests/kvm-unit-tests/x86/eventinj.c1#include "libcflat.h"
LOWtests/kvm-unit-tests/lib/libcflat.h21#define __LIBCFLAT_H
LOWtests/kvm-unit-tests/lib/libcflat.h61# define __PRI32_PREFIX
LOWtests/kvm-unit-tests/lib/pci-edu.h21#define PCI_VENDOR_ID_QEMU 0x1234
LOWtests/kvm-unit-tests/lib/virtio-mmio.h1#ifndef _VIRTIO_MMIO_H_
LOWtests/kvm-unit-tests/lib/virtio-mmio.h21#define VIRTIO_MMIO_GUEST_FEATURES_SEL 0x024
LOWtests/kvm-unit-tests/lib/kbuild.h1#ifndef _KBUILD_H_
LOWtests/kvm-unit-tests/lib/asm-generic/page.h21
LOWtests/kvm-unit-tests/lib/asm-generic/barrier.h1#ifndef _ASM_BARRIER_H_
LOWtests/kvm-unit-tests/lib/asm-generic/barrier.h21#ifndef smp_mb
LOWtests/kvm-unit-tests/lib/asm-generic/io.h101#endif
LOWtests/kvm-unit-tests/lib/asm-generic/pci.h1#ifndef _ASM_GENERIC_PCI_H_
LOWtests/kvm-unit-tests/lib/asm-generic/atomic.h1#ifndef __ASM_GENERIC_ATOMIC_H__
LOWtests/kvm-unit-tests/lib/libfdt/fdt.h101 size, content */
LOWtests/kvm-unit-tests/lib/libfdt/libfdt.h161/**********************************************************************/
147 more matches not shown…
Hallucination Indicators9 hits · 90 pts
SeverityFileLineSnippet
CRITICALtests/devices/virtio_balloon.js57 emulator.v86.cpu.devices.virtio_balloon.GetStats(s => { console.log(s); });
CRITICALtests/devices/virtio_balloon.js58 emulator.v86.cpu.devices.virtio_balloon.Cleanup(async (zeroed) => {
CRITICALtests/devices/virtio_balloon.js99 emulator.v86.cpu.devices.virtio_balloon.Inflate(30000);
CRITICALsrc/browser/main.js3024 if(emulator.v86.cpu.devices.cdrom.has_disk())
CRITICALsrc/browser/main.js3032 if(emulator.v86.cpu.devices.cdrom.has_disk())
CRITICALsrc/browser/starter.js293 this.screen_adapter = new ScreenAdapter(screen_options, () => this.v86.cpu.devices.vga && this.v86.cpu.devices.v
CRITICALsrc/browser/starter.js1017 this.v86.cpu.devices.cdrom.set_cdrom(new SyncBuffer(result));
CRITICALsrc/browser/starter.js1026 this.v86.cpu.devices.cdrom.set_cdrom(image);
CRITICALsrc/browser/starter.js1037 this.v86.cpu.devices.cdrom.eject();
Cross-Language Confusion (JS/TS)5 hits · 35 pts
SeverityFileLineSnippet
HIGHtests/benchmark/arch-python.js38print("fib(", n, ")= ", fib(n))
HIGHtests/api/2g-mem.js38 print(m, " ", collectgarbage("count"))
HIGHtests/api/2g-mem.js41print("memory usage (kB) ", collectgarbage("count"))
HIGHtests/api/2g-mem.js42print("page count ", m)
HIGHtests/api/2g-mem.js47print("ok")
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippet
HIGHsrc/buffer.js704 // - loads slices of the file asynchronously as requested
Deep Nesting4 hits · 4 pts
SeverityFileLineSnippet
LOWtools/fs2json.py108
LOWtools/fs2json.py217
LOWtools/copy-to-sha256.py83
LOWtools/copy-to-sha256.py115
Excessive Try-Catch Wrapping1 hit · 2 pts
SeverityFileLineSnippet
MEDIUMtools/copy-to-sha256.py39 print("Error: zstandard module required when using --zstd flag")
Unused Imports1 hit · 1 pts
SeverityFileLineSnippet
LOWtools/copy-to-sha256.py11
Slop Phrases1 hit · 1 pts
SeverityFileLineSnippet
LOWtools/docker/alpine/build-state.js8console.log("Don't forget to run `make all` before running this script");
Hyper-Verbose Identifiers1 hit · 1 pts
SeverityFileLineSnippet
LOWsrc/browser/serial.js331export function VirtioConsoleAdapterXtermJS(element, bus, xterm_lib)