Bug #55336 [Opn->Csd]: mail() function is not thread safe for Windows builds

From: Date: Wed, 28 Mar 2018 22:00:19 +0000
Subject: Bug #55336 [Opn->Csd]: mail() function is not thread safe for Windows builds
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214513@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55336&edit=1

 ID:                 55336
 Updated by:         cmb@php.net
 Reported by:        grabli_2005 at mail dot ru
 Summary:            mail() function is not thread safe for Windows
                     builds
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Network related
 Operating System:   Windows
 PHP Version:        5.4.0alpha2
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

This bug has already been fixed by
<http://git.php.net/?p=php-src.git;a=commit;h=2841aa95db84f3563c94c90f84bf7f47ba159a2d>.


Previous Comments:
------------------------------------------------------------------------
[2011-08-30 20:50:21] grabli_2005 at mail dot ru

Link you provide is for crash-point backtrace. Read cearfully - its not crashed, its
not thread safe.
Problem function - win32\sendmail.c->TSendMail (with subfunctions) which uses global variables
without any locking.
Also I can`t change status back to "Open", only avalable options for now is assigned and
closed.

------------------------------------------------------------------------
[2011-08-28 21:29:51] pajoye@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Would rock if you can provide one.

------------------------------------------------------------------------
[2011-08-28 20:16:31] grabli_2005 at mail dot ru

Yep, I`ve got buffer corruption and socket leak under threading.
There no need of TSRM code, socket handle and buffer can be allocated on stack, it`s not so big
(4kb).

------------------------------------------------------------------------
[2011-08-22 14:51:22] kalle@php.net

Have you encountered any issues specific to this finding? I suppose we could make a new globals,
like PW32G for SendMail and stash the variables in there.

------------------------------------------------------------------------
[2011-08-03 18:20:59] grabli_2005 at mail dot ru

switch status to open, see details in previous comment

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=55336


--
Edit this bug report at https://bugs.php.net/bug.php?id=55336&edit=1


Thread (11 messages)

« previous php.bugs (#214513) next »