mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-03-01 13:58:06 +00:00
Fix test addresses to use uintptr_t instead of u_int64_t.
When a variable is used to set (and lookup) MappingInfo's "start_addr" field, it needs to match types -- which is "uintptr_t". When Chrome OS updated the 'make' that's used for building, the 32-bit "char *" had sign-extended when cast up to a u_int64_t -- maybe because pointers were unsigned before and then changed to be signed -- and that caused the address lookup to fail. BUG=chromium-os:25355 TEST=Ran Breakpad unittests A=mkrebs@chromium.org Review URL: http://breakpad.appspot.com/345001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@908 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
1197f761a4
commit
403124f9e2
|
@ -626,7 +626,7 @@ TEST(ExceptionHandlerTest, ModuleInfo) {
|
|||
MAP_PRIVATE | MAP_ANON,
|
||||
-1,
|
||||
0));
|
||||
const u_int64_t kMemoryAddress = reinterpret_cast<u_int64_t>(memory);
|
||||
const uintptr_t kMemoryAddress = reinterpret_cast<uintptr_t>(memory);
|
||||
ASSERT_TRUE(memory);
|
||||
|
||||
string minidump_filename;
|
||||
|
|
|
@ -144,7 +144,7 @@ TEST(LinuxPtraceDumperTest, MergedMappings) {
|
|||
0));
|
||||
ASSERT_TRUE(mapping);
|
||||
|
||||
const u_int64_t kMappingAddress = reinterpret_cast<u_int64_t>(mapping);
|
||||
const uintptr_t kMappingAddress = reinterpret_cast<uintptr_t>(mapping);
|
||||
|
||||
// Ensure that things get cleaned up.
|
||||
StackHelper helper(fd, mapping, kMappingSize);
|
||||
|
|
|
@ -121,7 +121,7 @@ TEST(MinidumpWriterTest, MappingInfo) {
|
|||
MAP_PRIVATE | MAP_ANON,
|
||||
-1,
|
||||
0));
|
||||
const u_int64_t kMemoryAddress = reinterpret_cast<u_int64_t>(memory);
|
||||
const uintptr_t kMemoryAddress = reinterpret_cast<uintptr_t>(memory);
|
||||
ASSERT_TRUE(memory);
|
||||
|
||||
const pid_t child = fork();
|
||||
|
@ -224,7 +224,7 @@ TEST(MinidumpWriterTest, MappingInfoContained) {
|
|||
MAP_PRIVATE,
|
||||
fd,
|
||||
0));
|
||||
const u_int64_t kMemoryAddress = reinterpret_cast<u_int64_t>(memory);
|
||||
const uintptr_t kMemoryAddress = reinterpret_cast<uintptr_t>(memory);
|
||||
ASSERT_TRUE(memory);
|
||||
close(fd);
|
||||
|
||||
|
|
Loading…
Reference in a new issue