Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

AI

You can't trust assembly an AI wrote. Here's the 3-command gate.

✨ Disclosure: this tutorial was drafted with AI assistance. Every technical claim is verified and source-traced in the linked repository. AI assistants are confident about assembly — and wrong in specific, repeatable ways. They invent mnemonics that do not exist, flip AT&T/Intel operand order, silently drop immediates, and misread bytes. When we audited real incidents, the failures shared a…

When writing about AI-generated assembly code, it's crucial to remain vigilant and verify every technical claim. AI assistants may invent non-existent mnemonics, flip operand orders, drop immediate values, or misread bytes. Real incidents often share a signature: the code appears plausible yet never errors. To prevent these errors, a mechanical gate can be implemented.

This gate involves assembling the code, disassembling it, and comparing it to the original. If the disassembly doesn't match the original instruction, mnemonic, operands, or size, then the instruction was not written correctly. Two examples of this gate catching errors include a non-existent mnemonic (movqad) and a truncated immediate value (38 dropped by the parser).

Additionally, switching between AT&T and Intel syntax can cause semantic changes in the code. To avoid these issues, it's essential to assemble the code, explicitly set the syntax dialect, and never mix AT&T and Intel syntax. Verifying the raw bytes for unusual instructions and consulting manuals like Intel SDM, ARM ARM, or RISC-V ISA is also crucial.

If the toolchain is unavailable, the code should be marked as UNVERIFIED and include the command that would check it. This discipline should be applied everywhere, including verifying real parallelism (thread counts and wall time) and ensuring APIs actually exist (using cargo search, for instance). The verification process should be self-validating, with a harness that cannot fail serving as evidence.

The repository "low-level-skills-trothbyte" provides 124 verified skills for various programming languages and assembly, with all claims source-traced and continuously updated.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

New Chinese model adds to AI competition

New Chinese model adds to AI competition

Chinese AI startup Zhipu said its new GLM-5.3 model outperformed Anthropic’s Mythos 5 in a key cybersecurity benchmark, marking the latest Chinese open-weight model to claim parity with the Western AI…

More from Sunday 16 August →