[WEBINAR] The New Normal: Dealing with the Reality of an Unsecure World

Stale Pointer Bug

Definition - What does Stale Pointer Bug mean?

A stale pointer bug refers to a category of delicate programming errors that could arise in codes that conduct dynamic allocation, specifically by means of the C language function "malloc" or its equivalent.

A stale pointer bug is also known as an aliasing bug.

Techopedia explains Stale Pointer Bug

In cases where various pointers address a certain chunk of storage, it could occur that the storage is freed or reallocated by means of a particular alias and then referenced via another. This can lead to delicate and perhaps sporadic lossage with respect to allocation history and the state of the malloc arena.

If no aliases are created for the allocated memory, this kind of bug can be easily avoided. Another option to avoid stale pointer bugs is the use of a higher-level language such as Lisp that incorporates a garbage collector.

The term stale pointer bug is currently linked to C programming; however, this bug was already present in a very similar manner in Fortran and ALGOL 60 during the 1960s.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.