Skip to content
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

Add wildcard filtering support when dump on exceptions #154

Merged
merged 3 commits into from
Jan 3, 2023

Conversation

oldzhu
Copy link
Contributor

@oldzhu oldzhu commented Dec 16, 2022

Add wildcard filtering support when dump on exceptions #153

inline WCHAR *getWCHARs(const String &src)
{
size_t len = src.Length();
WCHAR* tempbuff = new WCHAR[len+1];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check allocation result

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Mario! I will modify the other two and commit, but I have question for this allocation checking with the below two thoughts:

  1. There is no checking for other new allocations in the same file.
  2. The post below says seems we only need to check new allocation with no-throw
    https://stackoverflow.com/questions/5197732/should-one-always-check-if-the-new-operator-worked

// WildcardSearch - Search string supports '*' anywhere and any number of times
//
//--------------------------------------------------------------------
bool WildcardSearch(WCHAR* szClassName, WCHAR* szSearch)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Make this part of the profiler class

@@ -297,9 +297,10 @@ char* GetEncodedExceptionFilter(char* exceptionFilterCmdLine, unsigned int numDu
char* exceptionFilter = NULL;
char* exceptionFilterCur = NULL;
char tmp[10];
size_t len;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Initialize to 0

@MarioHewardt MarioHewardt merged commit c8f19bb into microsoft:master Jan 3, 2023
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.

2 participants