Urgent.News

What's breaking now, across thousands of outlets.

Tech

The 'or' that read too far

Verbose is a small language I build that compiles to native x86-64, to WebAssembly, and also runs in an interpreter. This post walks through one bug that showed up differently in each of those, with real binaries. It stands on its own; no Verbose knowledge needed. Before reading the first line of a notebook, you check there is something in it. Nobody does it the other way round. Nobody opens an…

Verbose is a small programming language that compiles to native x86-64, WebAssembly, and also runs in an interpreter. This bug was discovered in a Verbose program that uses the "or" operator. The "or" operator has two properties: its value and its order of computation. The value is true if at least one side is true, while the order determines when each side is computed.

In Verbose, the precaution to check if a text is empty or its first byte is non-zero is written as length(i.s) == 0 or byte_at(i.s, 0) == 0. This precaution protected the program when compiled to a native binary but failed when running through the interpreter or WebAssembly. The reason for the failure is due to the order of computation.

The native binary uses a short-circuit evaluation, meaning it only computes the right side if the left side is false. However, the interpreter and WebAssembly compute both sides, regardless of the left side's value, leading to an out-of-bounds error when evaluating the right side of an empty text. To fix this bug, the interpreter was modified to perform the "or" operation before reaching the right side, allowing the guard to function as intended. The native binary remains unchanged as it already used the short-circuit evaluation approach.

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 Tech

Exploring Open-Source Large Language Models for InkMind: Choosing a Better Poetry Continuation Model

Exploring Open-Source Large Language Models for InkMind: Choosing a Better Poetry Continuation Model Introduction Large Language Models (LLMs) have become important tools in natural language…

  • GPT-Neo-125M is lightweight with 125M parameters and MIT license.
  • Pythia-160M offers 160M parameters, Apache 2.0 license, and decoder-only architecture.
  • Qwen3-1.7B-Base has 1.7B parameters, 32,768 token context, and Apache 2.0 license.

Open Source Code Review Tools for GitHub and Self-Hosted Teams

Open source code review tools fall into two groups, and search results often mix them. Open source code review tools for GitHub run inside pull requests you already have: a GitHub Action or a CLI…

  • MergeJudge, reviewdog, Danger, and super-linter integrate into GitHub pull requests
  • Self-hosted Git forges like Gitea and GitLab offer alternative hosting and review servers
  • Tools support linting, static analysis, policy checks, and auto/block lane categorization

How to Choose the Right One for Your CI/CD Pipeline

AI API Testing Tools: How to Choose the Right One for Your CI/CD Pipeline AI is making it easier to generate test cases, but there is a problem: generating more tests does not necessarily mean finding…

  • AI simplifies test case creation in CI/CD pipelines
  • Focus on specification-driven testing using OpenAPI contracts

More from Monday 26 October →