<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/math-is-hard-g7pgrr2pz" -->

---
title: Math is hard | daily.dev
description: A deep dive into a long-standing bug in OpenBSD&#x27;s VAX kernel port, where arithmetic fault exceptions (floating overflow, divide-by-zero, underflow) caused...
canonical: https://daily.dev/posts/math-is-hard-g7pgrr2pz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Math is hard | daily.dev
og:description: A deep dive into a long-standing bug in OpenBSD&#x27;s VAX kernel port, where arithmetic fault exceptions (floating overflow, divide-by-zero, underflow) caused...
og:url: https://daily.dev/posts/math-is-hard-g7pgrr2pz
og:image: https://api.daily.dev/og/posts/G7PGRr2pZ.png
og:image:alt: Math is hard
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Math is hard

**[Hacker News](https://daily.dev/sources/hn)** · 13 min read · 0 upvotes · 0 comments

## Summary

A deep dive into a long-standing bug in OpenBSD's VAX kernel port, where arithmetic fault exceptions (floating overflow, divide-by-zero, underflow) caused processes to spin in an infinite SIGFPE signal loop when the signal was ignored. The root cause: the VAX architecture later changed certain arithmetic exceptions from traps to restartable faults, meaning the program counter pointed to the faulting instruction rather than the next one. The fix required the kernel to disassemble the variable-length VAX instruction to compute its length and advance the PC. The bug went unnoticed from 1979 to 2002 because early VAX 11/780 hardware only had trap-style arithmetic exceptions, and the change to fault-style exceptions was likely only considered from a VMS perspective, not BSD/Unix.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <http://miod.online.fr/software/openbsd/stories/vaxfp.html>

## Similar posts on daily.dev

- [The stack circuitry of the Intel 8087 floating point chip, reverse-engineered](https://daily.dev/posts/the-stack-circuitry-of-the-intel-8087-floating-point-chip-reverse-engineered-damxz0ovc) · Hacker News · 0 upvotes · 0 comments
- [Conditions in the Intel 8087 floating-point chip's microcode](https://daily.dev/posts/conditions-in-the-intel-8087-floating-point-chip-s-microcode-pfftxg6y6) · Hacker News · 1 upvotes · 0 comments

---

Tags: [#kernel-development](https://daily.dev/tags/kernel-development), [#openbsd](https://daily.dev/tags/openbsd)

[View this post on daily.dev](https://daily.dev/posts/math-is-hard-g7pgrr2pz)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Math is hard","url":"https://daily.dev/posts/math-is-hard-g7pgrr2pz","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/math-is-hard-g7pgrr2pz"},"datePublished":"2026-04-26T06:53:51.354Z","dateModified":"2026-05-21T02:13:28.304Z","description":"A deep dive into a long-standing bug in OpenBSD's VAX kernel port, where arithmetic fault exceptions (floating overflow, divide-by-zero, underflow) caused...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/fba3a90ed2a1848e300ee2ebe626885e?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/fba3a90ed2a1848e300ee2ebe626885e?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/math-is-hard-g7pgrr2pz","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"kernel-development,openbsd","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Math is hard"}]}
```

