Blame SOURCES/dyninst-rhbz1441810.patch
|
|
434122 |
Fix for handling regions that have no disk backing
|
|
|
434122 |
|
|
|
434122 |
--- dyninst-9.3.1/dyninstAPI/src/binaryEdit.h
|
|
|
434122 |
+++ dyninst-9.3.1/dyninstAPI/src/binaryEdit.h
|
|
|
434122 |
@@ -258,8 +258,12 @@ class memoryTracker : public codeRange {
|
|
|
434122 |
memoryTracker(Address a, unsigned s, void *b) :
|
|
|
434122 |
alloced(false), dirty(false), a_(a), s_(s)
|
|
|
434122 |
{
|
|
|
434122 |
- b_ = malloc(s_);
|
|
|
434122 |
- memcpy(b_, b, s_);
|
|
|
434122 |
+ if(b) {
|
|
|
434122 |
+ b_ = malloc(s_);
|
|
|
434122 |
+ memcpy(b_, b, s_);
|
|
|
434122 |
+ } else {
|
|
|
434122 |
+ b_ = calloc(1, s_);
|
|
|
434122 |
+ }
|
|
|
434122 |
}
|
|
|
434122 |
~memoryTracker() { free(b_); }
|