Skip to content

Conversation

@HapeMask
Copy link
Contributor

The Windows + MSVC-specific bug discussed here: #19394 and fixed here: #22405 still appears in C10's warning handler class. This results in a crash if a user attempts to run code which would print a warning when that code is running inside a thread created by a DLL. This PR applies a similar fix to that of #22405.

@dr-ci
Copy link

dr-ci bot commented Mar 16, 2020

💊 CircleCI build failures summary and remediations

As of commit 6ac55bc (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no CircleCI failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker.

This comment has been revised 21 times.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@HapeMask has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@smessmer smessmer left a comment

Choose a reason for hiding this comment

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

Fix looks good but I think we should factor this out into a singleton-like function, i.e. make warning_handler_ private on something and have a get_warning_handler() function that returns it and initializes it before if necessary. This way, we can make sure we never access it while uninitialized.

@HapeMask HapeMask force-pushed the fix_warning_thread_local branch from c3567d1 to 32f6d8b Compare March 24, 2020 19:30
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@HapeMask has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@HapeMask merged this pull request in d6377b7.

gchanan pushed a commit to gchanan/pytorch that referenced this pull request Mar 25, 2020
Summary:
The Windows + MSVC-specific bug discussed here: pytorch#19394 and fixed here: pytorch#22405 still appears in C10's warning handler class. This results in a crash if a user attempts to run code which would print a warning when that code is running inside a thread created by a DLL. This PR applies a similar fix to that of pytorch#22405.
Pull Request resolved: pytorch#34822

Test Plan:
* Tested locally by running CodecverseWorkbench Unity app with patched build.
* CI

Differential Revision: D20627971

Pulled By: HapeMask

fbshipit-source-id: 64dfca531ed7eebbe9e0ecac3d3d4d025c683883
smessmer pushed a commit that referenced this pull request Mar 26, 2020
Summary:
The Windows + MSVC-specific bug discussed here: #19394 and fixed here: #22405 still appears in C10's warning handler class. This results in a crash if a user attempts to run code which would print a warning when that code is running inside a thread created by a DLL. This PR applies a similar fix to that of #22405.
Pull Request resolved: #34822

Test Plan:
* Tested locally by running CodecverseWorkbench Unity app with patched build.
* CI

Differential Revision: D20627971

Pulled By: HapeMask

fbshipit-source-id: 64dfca531ed7eebbe9e0ecac3d3d4d025c683883
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants