TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Random Values in Pointers

35 pointsby karagenit9 months ago

2 comments

zabzonk9 months ago
putting bad values into pointer variables in gc'd languages is arguably worse than doing so in non-gc'd ones. i'd say that gc'd languages should prevent you from doing it.
mjcohen9 months ago
A while ago, I was using an emulator for a 32-bit processor I was writing code for. To detect access of non-initialized storage, instead of having an out-of-band bit for each word, it stored hex deadbeef in each word before program start and, at each memory read, checked for this. If it was found, the enulator halted with an error.<p>This was very handy in catching errors. I never saw this particular word actually generated, so it never indicated a false error.