Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(874)

Side by Side Diff: hax/haxlib.cc

Issue 2268853002: example failure for UncheckedMalloc + DSO (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « hax/hax.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #include "base/logging.h"
2 #include "base/process/memory.h"
3
4 extern "C" void __attribute__((visibility("default"))) Hax() {
5 void* ptr;
6
7 // Normal malloc/free - no problems
8 ptr = malloc(64);
9 free(ptr);
10
11 // Unchecked malloc/free - problems!
12 CHECK(base::UncheckedMalloc(42, &ptr));
13 free(ptr);
14 }
OLDNEW
« no previous file with comments | « hax/hax.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698