HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
emeryberger
DieHard
C++2014–2024
emeryberger / DieHard

DieHard

DieHard: An error-resistant memory allocator for Windows, Linux, and Mac OS X

5Distinct people
6Mentions
0Explicit recommenders
425GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

DieHard: An error-resistant memory allocator for Windows, Linux, and Mac OS X

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year6 dated mentions

Observed mentions: 2014-11-16 16:14:04 UTC to 2024-03-16 14:19:25 UTC.

0122014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC211
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC110
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202

What Hacker News says

6 sources
From the The Computational Beauty of Nature: https://github.com/gwf/CBofN If you use CWM as your window manager, it might crash as some of the software only works fine with the bundled FVWM release or TWM. You can use DieHard: https://github.com/emeryberger/DieHard Usage: env LD_PRELOAD=/path/to/DieHard/src/libdiehard.so /path/to/your/binary example: env LD_PRELOAD=$HOME/src/DieHard/src/libdiehard.so $HOME/src/CBofN/bin/mandel Xaos it's a fun software from the 90's, I think today uses QT5 instead of Xaw, but it's virtually the same interface. Another examples would be the ones from the AI Alife Howto's from the 90's. And, finally, there's the uber known Gnuplot, albeit it's from late 80's, but it was widely developed and used in the 90's, and still really powerful to plot from whatever software, as it can use plain text files and you can
Read the rest
compile it without QT and WX, making it extremely light on legacy software. BTW, there was some language to create math figures/art declaratively. A la povray, but without raytracing. I can't remember it's name. It wasn't pic, or PostScript.
In Old Math Software from 1990s
Thanks for the clear explanation. Looking at the source code, it looks similar to modern allocators, just without the per-thread heaps. (I think all modern allocators use size-class slab allocators for small objects.) Curiously, I don't think the academic community has much literature on hardened allocators. It's been a while since I've worked in the area, but I wasn't aware of any other than DieHard from 2006 [1]. I did some searched on the ACM Digital Library (I love that it's all free right now so I can easily provide links in forums), and the only other thing I could find was FreeGuard from 2017 [2]. Maybe the issue there is that academics who design memory allocators tend to be on the systems side of CS, and such people tend to use raw performance as a part of the evaluation. Better security for a new thing does not show up in a grap
Read the rest
h. (Even that FreeGuard paper from 2017 claims security with better performance.) In the non-academic world, I found the one we're discussing, but also Scudo (https://llvm.org/docs/ScudoHardenedAllocator.html). And that's it. If I still worked in the area, I would try to go after scalable hardened allocators. I wonder if there's still some clever stuff we haven't thought of there. [1] https://github.com/emeryberger/DieHard, https://dl.acm.org/doi/abs/10.1145/1133981.1134000 [2] https://github.com/UTSASRG/FreeGuard, https://dl.acm.org/doi/abs/10.1145/3133956.3133957
In Why does musl make my Rust code so slow?
What a hack! They have an "automatic patch generator" which "fixes" programs with buffer overflows and dangling pointers. (Ref: https://github.com/emeryberger/DieHard/blob/master/docs/pldi...) If a buffer overflow is detected, the code is patched to make the buffer bigger. If a dangling pointer (use after free) is detected, a time delay is inserted so that the buffer is released some time later than the "free" call. That this is useful is a good argument to get out of C/C++ and into Go, or Rust, or just about anything with subscript checking.
In DieHard: An error-resistant memory allocator for Windows, Linux, and Mac OS X

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.