# Unraveling a Postgres segfault that uncovered an Arm64 JIT compiler bug

DevFeed: [Unraveling a Postgres segfault that uncovered an Arm64 JIT compiler bug](<https://devfeed.tech/articles/unraveling-a-postgres-segfault-that-uncovered-an-arm64-jit-compiler-bug-83513.md>)

Original publisher: [Read original article](<https://www.datadoghq.com/blog/engineering/unraveling-a-postgres-segfault/>)

Author: Anthonin Bonnefoy; Mitch Ward; Gillian McGarvey

Published: 2025-01-15T00:00:00Z

Content type: article

Language: en

Sources: [Datadog](<https://devfeed.tech/sources/datadog.md>)

Topics: [Compiler](<https://devfeed.tech/topics/compiler.md>), [Heroku Postgres](<https://devfeed.tech/topics/heroku-postgres.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [Arm](<https://devfeed.tech/topics/arm.md>), [Numba](<https://devfeed.tech/topics/numba.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>)

Tags: [arm](<https://devfeed.tech/tags/arm.md>), [arm64](<https://devfeed.tech/tags/arm64.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [cuda](<https://devfeed.tech/tags/cuda.md>), [jit](<https://devfeed.tech/tags/jit.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>)

## AI overview

The investigation traces Postgres segmentation faults on Arm64 to an LLVM RuntimeDyld relocation bug. The team reproduced the failure, debugged the generated JIT assembly, and found that code and data sections could be allocated farther apart than the Arm64 ABI permits. Disabling JIT on Arm64 mitigated the problem, and a Postgres fix was released across supported versions.

## Source excerpt

Learn how an unassuming Postgres error led us to discover a bug in Postgres for Arm.