[WEBINAR] Better to Ask Permission? Best Practices for Privacy and Security

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.

Share this:

Connect with us

Email Newsletter

Join thousands of others with our weekly newsletter

The 4th Era of IT Infrastructure: Superconverged Systems
The 4th Era of IT Infrastructure: Superconverged Systems:
Learn the benefits and limitations of the 3 generations of IT infrastructure – siloed, converged and hyperconverged – and discover how the 4th...
Approaches and Benefits of Network Virtualization
Approaches and Benefits of Network Virtualization:
Businesses today aspire to achieve a software-defined datacenter (SDDC) to enhance business agility and reduce operational complexity. However, the...
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.