# reentrantcy issue with ext/standard/parsedate.y

- Thread: https://externals.io/message/367
- Original archive: https://news-web.php.net/php.internals/367
- Started by David Hill on 2003-03-27T14:44:52+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #367 — David Hill — 2003-03-27T14:44:52+00:00

URL: https://externals.io/message/367#367

Hi all,
    while trying to understand a test failure on Tru64 I noticed that 
ext/standard/parsedate.y is not reentrant. I am assuming that we do care 
about this given the effort with ZTS and I care because I build Apache2 
multithreaded.

    I am not much of a bison expert (other than to say that bison 
burgers taste very good :-), but google pointed me to the proper page of 
the bison manual which gave me enough hints to allow me to rework the 
parsedate.y code to be %pure_parser.

    As the diff is almost bigger than the file, I am attaching 
parsedate.y in case someone wants to try it on thier machine.  I tried 
this on tru64 and on debian and it passes the test: 
ext/standard/tests/time/002.phpt

    I checked this against bison-1.28 and bison-1.875.

    Unless I hear otherwise, I will be submitting this (.y & .c) 
tommorow into php5, and think this would be a good candidate for a MFH.

Dave
