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

Ask A Question

Stats

  • Questions 505k
  • Answers 506k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You'll want to read the C++ FAQ "Why can't I… May 16, 2026 at 3:33 pm
  • Editorial Team
    Editorial Team added an answer The first thing to remember, is that there is no… May 16, 2026 at 3:33 pm
  • Editorial Team
    Editorial Team added an answer It doesn't matter what platform you use to do this,… May 16, 2026 at 3:33 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm a newbie to Linux systems and recently I started using Ubuntu 10.04. When
I have a bit of a complex situation. I am building an iPhone app
Which (commercial or free) installer tool would you recommend to replace InstallAnywhere as the
I am going to start a new C++ project that will rely on a
I'm interested to play around with RoR a bit. Apart from literature i should
This is maybe unusual so let me set the scene: We have an SVN
I need to connect to a remote MySQL database and have created the following
I've installed SSRS on my development machine and everything works as expected - except
I export try.jar file using 32 bit java libraries. On the client site, I
I am resetting up my development machine and I cannot seem to remember where

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.