php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70933 Abnormal stop when setlocale is called with invalid parameter
Submitted: 2015-11-18 07:01 UTC Modified: 2015-11-29 04:22 UTC
From: piyoyo at users dot noreply dot github dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 7.0.0RC7 OS: Windows10
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: piyoyo at users dot noreply dot github dot com
New email:
PHP Version: OS:

 

 [2015-11-18 07:01 UTC] piyoyo at users dot noreply dot github dot com
Description:
------------
Abnormal stop 
when setlocale is called with invalid parameter utf8 encoded such as non ascii code.


Test script:
---------------
<?php
  setlocale(LC_TIME, 'en_US.UTF-8');




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-18 07:30 UTC] laruence@php.net
what do you mean by "abnormal stop"?
 [2015-11-18 10:15 UTC] piyoyo at users dot noreply dot github dot com
CLI has stopped working error message

php -nr "setlocale(LC_TIME, chr(130));"
 [2015-11-18 10:30 UTC] ab@php.net
@piyoyo in the description, besides en_US.UTF-8 is not a valid locale on Windows, are you aware that you pass an multi byte string? So in best case you'll just get false, or even a parse error.

With your second snippet I can't reproduce any crash neither, i just got false in that case. Please check the event log and maybe try to get a backtrace https://bugs.php.net/bugs-generating-backtrace-win32.php or memory dump https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181%28v=vs.85%29.aspx

Thanks
 [2015-11-18 10:32 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2015-11-29 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 07 02:01:27 2024 UTC