Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 961243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:18:44+00:00 2026-05-16T01:18:44+00:00

For C++ development for 32-bit systems (be it Linux, Mac OS or Windows, PowerPC

  • 0

For C++ development for 32-bit systems (be it Linux, Mac OS or
Windows, PowerPC or x86) I have initialised pointers that
would otherwise be undefined (e.g. they can not immediately
get a proper value) like so:

int *pInt = reinterpret_cast<int *>(0xDEADBEEF);

(To save typing and being DRY the right-hand side would normally
be in a constant, e.g. BAD_PTR.)

If pInt is dereferenced before it gets a proper value then
it will crash immediately on most systems (instead of
crashing much later when some memory is overwritten or going
into a very long loop).

Of course the behavior is dependent on the underlying
hardware (getting a 4 byte integer from the odd
address 0xDEADBEEF from a user process may be perfectly
valid), but the crashing has been 100% reliable for all the
systems I have developed for so far (Mac OS 68xxx, Mac OS
PowerPC, Linux Redhat Pentium, Windows GUI Pentium, Windows
console Pentium). For instance on PowerPC it is illegal (bus
fault) to fetch a 4 byte integer from an odd address.

What is a good value for this on 64-bit systems?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:18:45+00:00Added an answer on May 16, 2026 at 1:18 am

    Generally it doesn’t matter exactly what pattern you write, it matters that you can identify the pattern in order to determine where problems are occurring. It just so happens that in the Linux kernel these are often chosen so that they can be trapped if the addresses are dereferenced.

    Have a look in the Linux kernel at include/linux/poison.h. This file contains different poison values for many different kernel subsystems. There is no one poison value that is appropriate.

    Also, you might check per-architecture include files in the Linux kernel source tree for info on what is used on specific architectures.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm rather new to Backbone.js development, and have run into a bit of a
In our environment, we have 32-bit and 64-bit machines for development. In VS 2010,
The situation: I need to convert our current development environment from Windows XP 32-bit to
I have recently setup a new development PC, which is 64 bit and has
Most python frameworks will have a development webserver of some kind that will have
We use a mixture of 32-bit and 64-bit development environments. Some of our class
im a bit new at extension development, but im about to embark upon a
I am a bit new to iOS Development and I was wondering if someone
I'm a bit new to .Net development, been working in Java for some time
I'm getting a bit more seasoned with my iPhone development but I still don't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.