6.0.0-beta1
7/17/25

[#6389] Recurrence::nextRecurrence(weekly) recursive function call
Summary Recurrence::nextRecurrence(weekly) recursive function call
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester thomas.jarosch (at) intra2net (dot) com
Created 03/06/2008 (6342 days ago)
Due
Updated 05/26/2008 (6261 days ago)
Assigned 05/24/2008 (6263 days ago)
Resolved 05/26/2008 (6261 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/26/2008 09:19:08 AM Jan Schneider Taken from Jan Schneider
State ⇒ Not A Bug
 
05/26/2008 07:55:49 AM Thomas Jarosch State ⇒ Resolved
 
05/26/2008 07:54:29 AM Thomas Jarosch Comment #3 Reply to this comment
Hello Jan,
The code has been there working fine for almost 7 years, so I'd
rather not want to change it. But if you could provide a test case to
reproduce the infinite loop we could try to track down what's going
wrong.
The infinite loop was caused by broken data which triggered a weekly 
recurrence with 98949324892 recurrences. I've fixed that by #6388,

so I think we can leave the code as it is until we stumble

on it again with real data (which probably shouldn't happen).



Thomas


05/24/2008 05:24:41 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
The code has been there working fine for almost 7 years, so I'd rather 
not want to change it. But if you could provide a test case to 
reproduce the infinite loop we could try to track down what's going 
wrong.
03/10/2008 05:31:19 PM Jan Schneider State ⇒ Assigned
 
03/06/2008 05:03:23 PM Chuck Hagenbuch Assigned to Jan Schneider
 
03/06/2008 04:40:31 PM thomas (dot) jarosch (at) intra2net (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Recurrence::nextRecurrence(weekly) recursive function call
Queue ⇒ Horde Framework Packages
State ⇒ Unconfirmed
Reply to this comment
Hello together,



during tests with the new Kolab freebusy framework I bombarded the 
code with all kinds of calendering data. Suddenly PHP started 
segfaulting.



It turned out this was due to a 
Horde_Date_Recurrence::nextRecurrence() recursive function call for an 
unlimited weekly recurrence which hit the internal stack size limit of 
PHP. After adding a debug

counter I saw nextRecurrence() being called over 1.600 times.



Jan, as you are most familiar with the recurrence code,

would it be possible to change the recursive function call into a loop?



Cheers,

Thomas


Saved Queries