Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i#725: add attach for windows #5075
i#725: add attach for windows #5075
Changes from all commits
33813aa
a14f62d
0e6c122
aa91d10
b17a7ce
190a64a
b5831a1
e1395fe
1c122be
ed9e6fe
c17cacb
7f3ecff
48ae3a1
4bd99cf
6f71095
810d158
0a92b19
b68ac76
54004d7
297623c
65aa1d3
9c88f8a
b240bb5
5e3918b
bf46cb3
35b4d3a
9627368
9b5ea65
6123e34
587eddc
e278ba0
d63c3dc
41eb20d
f6491fb
2d3f73c
ea7075d
803b9b6
ed79c08
d19ac58
c370933
dd6787e
8aa5174
9f96719
59e2b2f
a5be58e
ad08207
a864eed
4059d69
120af3a
b3c40ce
4d653dd
8c64ddc
dffe96e
e773e2b
4b8638f
a59f3bd
b456527
26120cf
36d86f5
ba70942
329a48d
accfb2b
aa2c4de
29b6849
afd6fa5
5d17e95
1d28f79
61a6806
1d9e5cf
d73b411
9d9f158
4c80ef6
2a52ee7
f49c55b
dfd7aa2
59a0bca
87bc182
40b2e3c
84f0d94
c5fb1cb
d9d8397
5a80d47
7d3d7d3
db27625
ece642a
1e2d514
a277d9b
5f94a61
60e922a
7221081
91d8871
f8d0d26
3a0f85c
a7c06ce
372ac42
fccef32
a6ddcbf
3fc4382
7a61fc1
3ba05bd
38c36c2
b255d54
26a60cc
1178999
64e285f
144e343
80a66f4
8d2e6ee
64eff60
bd075d2
53e2c0d
ef1fe09
fafe09f
f21c03d
9d65948
814bb84
69e28f9
bd12962
5dfff56
6309d9c
ce1ba11
c057c8f
a094f15
f8e192c
34efad1
a6a483f
7339837
b3e922d
ce2567e
c621abb
35616d0
d8fe564
e7a3aad
e46101d
7a085af
d011ed6
f08ccf5
fe71092
aa7076f
16fb008
c49d24d
414d98f
7fe6225
0d328f8
a624caf
dace614
b104f8d
6acf667
7ef77d4
e01450a
e37d6a1
1a03662
2e9610b
30f0b44
90f92c8
9950805
0f72795
70580b1
6b2b253
e989487
54c9a2d
ee83360
54e67ea
963a780
ec949d8
f4ffe77
749d26e
df2f5b5
18523f0
6bff993
d163d41
7b6e4c9
72f3c0a
6ea5c52
028b220
f36e351
836f664
9acba5b
17f4769
58aa93e
5d387e4
955d1c9
1b4f4c1
fd0b2c5
9695c9f
cba58d2
972eeca
6760cf7
19d8d1a
28b7ce2
d481517
203cc5b
6cbb4a8
2595ffc
b961748
12a61c1
eb5dada
cc9171b
7d910c6
916110c
57b10dd
384edf6
b5917a1
4d17238
23d5fbd
7f34d6d
0bc9fbd
c07fc17
c91494b
be0de15
8698c55
bbf4720
84b4f03
06cf8c7
5128890
cb3de86
3e889dc
96304dd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean the outer loop never terminated? I'm not seeing how that could happen -- mbi.RegionSize being incorrect?? But we have many other loops like this.
No kernel32 is not always loaded: early on in the life of a process there's only ntdll, and DR's earliest injection takes over well before kernel32 is loaded, so you could imagine this function being called then by DR code. (And I think it's possible to create a process that never uses kernel32 but a pathological case for sure.)
But maybe not worth effort at this point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output was something like this:
I see. But for now we only use kernel32 for attach, so maybe it is ok to assume it is loaded? (though clearly not the best)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a XXX or TODO or even FIXME comment to that loop explaining the infinite loop you saw.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do that.
In the meanwhile, I added a print of the address:
So something weird happens when the address passes 0x800000000000.
Maybe just add
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this infinite loop only happening for 32-bit (WOW64)? The drrun and the target are the same bitwidth?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I only tested on a 64 bit machine: it only happens for 32-bit (both the drrun and infloop).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do remember some weird Windows kernel behavior with memory query walks but not quite this one.
The one I'm thinking of is the AllocationBase: DynamoRIO/drmemory#2328 (comment)