Skip to content

Conversation

@thaystg
Copy link
Contributor

@thaystg thaystg commented Jan 22, 2020

Creating a fork process to access address that came from IDE using PointerValue. The IDE can send an invalid address and it was crashing mono.

Fixes #18191

…interValue. The IDE can send an invalid address and it was crashing mono.

Fixes mono#18191
Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Interesting approach
  2. How often does the debugger send these pointer commands? Does it only happen for user expression evaluation, or also for every local variable in a frame or other things like that that can happen on every step?
  3. Usual convention is exit(0) for success, and 1 for failure

@thaystg
Copy link
Contributor Author

thaystg commented Jan 22, 2020

  1. Interesting approach
  2. How often does the debugger send these pointer commands? Does it only happen for user expression evaluation, or also for every local variable in a frame or other things like that that can happen on every step?
  3. Usual convention is exit(0) for success, and 1 for failure

The debugger send these pointer commands on every step if there is a pointer variable like Int32*, I assumed that this is not VERY used, do you disagree?
The debugger send these pointer command either when the user evaluates an expression that returns a ref like in this sample #18191

@lambdageek
Copy link
Member

This is also related to #15612

@thaystg thaystg requested a review from lambdageek January 24, 2020 16:47
@thaystg
Copy link
Contributor Author

thaystg commented Jan 25, 2020

@monojenkins build failed

1 similar comment
@lambdageek
Copy link
Member

@monojenkins build failed

@thaystg
Copy link
Contributor Author

thaystg commented Jan 25, 2020

@monojenkins build Windows x64 FullAOT+LLVM

@thaystg
Copy link
Contributor Author

thaystg commented Jan 25, 2020

@monojenkins build OS X x64 iOS SDK

@thaystg
Copy link
Contributor Author

thaystg commented Jan 25, 2020

@monojenkins build Linux AArch64

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@thaystg thaystg merged commit f8c34dc into mono:master Jan 26, 2020
thaystg added a commit to thaystg/debugger-libs that referenced this pull request Jan 27, 2020
thaystg added a commit to mono/debugger-libs that referenced this pull request Jan 28, 2020
UnityAlex pushed a commit to Unity-Technologies/mono that referenced this pull request Aug 7, 2020
…ono#18537)

* Validate the address that came from IDE using PointerValue. The IDE can send an invalid address and it was crashing mono.

Fixes mono#18191
Fixes mono#15612

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
UnityAlex pushed a commit to Unity-Technologies/mono that referenced this pull request Aug 10, 2020
…ono#18537)

* Validate the address that came from IDE using PointerValue. The IDE can send an invalid address and it was crashing mono.

Fixes mono#18191
Fixes mono#15612

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>

Wrap create_file_to_check_memory_address in #ifndef _MSC_VER check as it's only used in that scope.
dtomar-rythmos pushed a commit to Unity-Technologies/mono that referenced this pull request Sep 14, 2020
…ono#18537)

* Validate the address that came from IDE using PointerValue. The IDE can send an invalid address and it was crashing mono.

Fixes mono#18191
Fixes mono#15612

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>

Wrap create_file_to_check_memory_address in #ifndef _MSC_VER check as it's only used in that scope.
dtomar-rythmos pushed a commit to Unity-Technologies/mono that referenced this pull request Sep 14, 2020
…ono#18537)

* Validate the address that came from IDE using PointerValue. The IDE can send an invalid address and it was crashing mono.

Fixes mono#18191
Fixes mono#15612

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>

Wrap create_file_to_check_memory_address in #ifndef _MSC_VER check as it's only used in that scope.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mono crashes on attemp to evaluate 'ref' returning method with debugger

3 participants