Skip to content

Bug sweep: Rust, Arduino and Assembly (6 findings) #19

Closed

Description

@otzpt

Found by a read-and-run sweep of this area on 2026-11-09. Each item was reproduced by a finder and checked by a second agent that tried to refute it.

Status key: fix drafted = a change exists on a local branch (fix/bug-sweep) but is not reviewed or merged. refuted = the second agent could not confirm it; kept here for a human decision.

  • F1 (fix drafted) assembly/src/lessons_c.asm:120: Module 9's build command for examples/09/free.c does not link on a gcc that enables the stack protector by default. The lesson says this command was built and run, but here it fails to link.
  • F2 (refuted) assembly/src/lessons_c.asm:161: The lesson states the finished no-libc program is 9128 bytes. That size depends on the linker, and a different one was observed.
  • F3 (fix drafted) assembly/Makefile:18: The EXAMPLES dependency list omits solutions/*.c. Lessons 15 and 16 incbin solutions/15.c and 16.c, so editing them does not rebuild the lesson.
  • F4 (fix drafted) arduino/course/lessons_more.ino:365: The quoted compiler error for char word[5] = "robot" leaves out the [-fpermissive] suffix that g++ prints. The other quoted diagnostics in the course keep their flag tags.
  • F5 (fix drafted) rust/src/lessons_hardware.rs:121: Part 2 presents ldr / orrs / str as the compiled thumbv6m code for set_bit. set_bit computes 1 << bit from a runtime argument, so the real output also needs a shift. The listing and the 'three instructions' claim cannot be the complete compiler output. UNRUN: rustc is not installed here.
  • F6 (fix drafted) rust/Makefile:15: The course binary embeds asm/add.asm with include_str! in lessons_advanced.rs, but asm/add.asm is not a prerequisite of the target. Editing the NASM file does not rebuild rust-course, so the lesson shows stale source. UNRUN: rustc is not installed.

Not run in this sweep (tool missing or out of scope):

  • All Rust: rustc and cargo are not installed. rust/Makefile, check-course.py, check-solutions.py, check-embedded.py and run-embedded.py were not run. They were py_compile'd and read only. Rust findings F5 and F6 are from source reading.
  • The compiler messages quoted in the Rust lessons (E0382, E0502, E0106, E0308, E0369, E0004, the char boundary panic text, and 250u8 + 10 overflow behaviour) were not verified. 250u8 + 10 written as a literal is normally rejected by rustc's deny-by-default arithmetic_overflow lint, so whether the lesson's 'a program built without optimisation stops with attempt to add with overflow' holds for that exact literal is unknown. The lesson says it was copied from a run, possibly with a runtime value.
  • The exact text of the str slicing panic in lessons_memory.rs line 242 ('(bytes 0..2 of string)') could not be compared with a real rustc here.
  • assembly/check-os.py, vm.py and all OS modules 10-16 boot checks: qemu-system-x86_64 is not available. Only assembled and linked: boot1/boot2, stage1/stage2, pm, lm, every os/traps/*.asm, os/kernel (make), os/interrupts (make). All built without errors. Their runtime claims (register dumps, exception logs, 'exception 8 at 0x...18', serial output) were not observed.
  • assembly solutions 10-16 (boot/kernel/interrupts challenges): check-course.py printed 'qemu-system-x86_64 not found: boot challenge NOT checked'. solutions/15.c and 16.c are fragments by design and do not compile standalone.
  • arduino/avr/*: avr-gcc and simavr are not available, so check-avr.py, run-avr.py, sizes.cpp, snippets.cpp, execute.cpp, swap_nibbles.S and use_swap.cpp were not compiled or executed. py_compile and reading only. The quoted AVR listings (sbi 0x05, 5; swap r24; in r25, 0x3f ...) and the 'avr-gcc 14.3' version claim were not verified.
  • assembly/src/lessons_boot.asm, lessons_kernel.asm, lessons_flow.asm, lessons_input.asm and lessons_basics.asm, and most of lessons_memory.asm and lessons_bits.asm (lines 330+): only partly read. check-course.py walked all 16 modules to SUMMARY and the live-computed lines passed, but not every sentence was cross-checked against a run.
  • check-os.py (615 lines) was only py_compile'd, not read in full.
  • The README claim 'Nothing here was run on real hardware' and the QEMU 10.2 / SeaBIOS statement were not checkable.
  • NASM 3.01 behaviour quoted in lessons_memory.asm ('NASM 3.01 does not refuse a bare store of a number, it picks ONE byte'). This machine has NASM 2.16.03, where mov [x], 5 fails with 'operation size not specified'. The lesson names the version and no lesson code relies on the bare form, so it is not filed as a bug, but it was not reproduced either.

Activity

  1. added
    bug
    on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions