[PATCH] D49159: [windows] Fix out-of-memory failure in some of the tests

Stella Stamenova via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 10 15:44:15 PDT 2018


The memory address that we are reading from is invalid in the test that is failing – it has not been initialized, so it points to an invalid location. ReadProcessMemory can fail for a number of reasons and in this case I believe it’s because it doesn’t have access to read from that particular memory location.

Thanks,
-Stella

From: Zachary Turner <zturner at google.com>
Sent: Tuesday, July 10, 2018 3:38 PM
To: reviews+D49159+public+f5176ed1b1117dd2 at reviews.llvm.org
Cc: Stella Stamenova <stilis at microsoft.com>; aaron.lee.smith <aaron.lee.smith at gmail.com>; llvm-commits at lists.llvm.org
Subject: Re: [PATCH] D49159: [windows] Fix out-of-memory failure in some of the tests

Any idea Why does the call fail?
On Tue, Jul 10, 2018 at 3:26 PM Stella Stamenova via Phabricator <reviews at reviews.llvm.org<mailto:reviews at reviews.llvm.org>> wrote:
stella.stamenova created this revision.
stella.stamenova added reviewers: asmith, zturner.
Herald added a subscriber: llvm-commits.

When ReadProcessMemory fails, bytes_read is sometimes set to a large garbage value. In that case, we need to set it back to zero before returning or the garbage value will be used to allocate memory later causing LLDB to crash with an out of memory error.


Repository:
  rL LLVM

https://reviews.llvm.org/D49159<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews.llvm.org%2FD49159&data=02%7C01%7CSTILIS%40microsoft.com%7C2d1f183f0e124d7c994208d5e6b5c66a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636668590753332113&sdata=ZOP6%2B2oxEkIvmonPJneFZLVLwAJoHuO8RxU1uxw1WSg%3D&reserved=0>

Files:
  source/Plugins/Process/Windows/Common/ProcessWindows.cpp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180710/4a4a0495/attachment.html>


More information about the llvm-commits mailing list