Reentrancy
Updated 2026-07-30
Summary
Reentrant or re-entrant can refer to:
Definition
A function that is interrupted during execution (e.g., called by a signal handler) and then called again. If it can execute correctly without corrupting the previous state, it is 'reentrant'. The premise is: not relying on global variables, only using local data.
Introduction
How to use
The ability to be interrupted at any time. Modern life is full of interruptions. To build yourself as a 'reentrant' system: work without relying on 'a specific mood' or 'continuous blocks of time' (global variables). Be interrupted at any time, resume at any time, and do it without errors.
Mechanism
Reentrancy refers to a program module that can be interrupted during execution and safely re-entered (called again), requiring that it does not depend on static shared state. In the context of smart contracts, reentrancy is a typical vulnerability.
Practice
In progress 0/1Practice this model in one real situation:
Cases
- Ethereum's The DAO lost a huge amount of money due to a reentrancy vulnerability that allowed repeated withdrawals.
Common pitfalls
- Mistakenly thinking that single-threaded means no reentrancy. Callbacks, interrupts, and async can all trigger it.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Reentrantverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS