-
-
Notifications
You must be signed in to change notification settings - Fork 418
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
Fix silent crash with incorrect time formats in Windows #2971
Conversation
Looks like the debug builds timed out on Windows. I'll restart to see if they run faster. |
Thanks @mpbagot ! |
What's happening is that the windows runtime pops up a modal dialog when an assert is hit in debug code. I'll look into disabling that dialog. |
The attached patch should disable the exception popups in debug builds. |
@kulibali Sorry, I'm a bit confused, I haven't done many pull requests before. What should I be doing with that patch? |
No worries. You can apply that patch (e.g. Thanks for the PR! |
src/libponyrt/lang/time.c
Outdated
#ifdef PLATFORM_IS_WINDOWS | ||
_invalid_parameter_handler old_handler, new_handler; | ||
new_handler = format_invalid_parameter_handler; | ||
old_handler = _set_invalid_parameter_handler(new_handler); |
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.
should we better use: _set_thread_local_invalid_parameter_handler in order to not interfere with other scheduler threads?
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 agree, that would be a much better idea, given the multi-threaded nature of Pony.
Thanks again @mpbagot |
introduced with ponylang/ponyc#2971
* adapt to new partial PosixDate.format introduced with ponylang/ponyc#2971 * change circle-cli setup to test master against ponyc master and release branch against the latest ponyc release this way we maintain compatibility between http master and ponyc master and between http releases and ponyc releases. * fix circleci config.yaml * add test ensuring common log format and also that the PosixDate.format call does not error.
@mpbagot do you feel up to writing the release notes comment for this? it would:
|
This is a pull request to address issue #2729 . It sets the
PosixDate.format()
function as a partial function, and catches the structured exception thrown by Windows, throwing a Pony error instead.