[bug #47422] [NSCalendarDate descriptionWithCalendarFormat] hangs with some dates

Sam Thompson <[email protected]>
Newsgroups gmane.comp.lib.gnustep.bugs
Message-ID <[email protected]>
URL:
  <http://savannah.gnu.org/bugs/?47422>

                 Summary: [NSCalendarDate descriptionWithCalendarFormat] hangs
with some dates
                 Project: GNUstep
            Submitted by: sthompso
            Submitted on: Tue 15 Mar 2016 04:35:59 PM GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:


Trying to format some representations of dates using [NSCalendarDate
descriptionWithCalendarFormat], causes a hang within GNUStep library.


Please find attached sample application source-code which demonstrates the
behavior.


The first date succeeds, but the second results in a hang.

Output:
$ obj/DateFormatTest.exe
daysSince1970: 8640000000. secondsSinceReference: 746495021692800.
Converted to 07-06-139044
daysSince1970: 2147483651. secondsSinceReference: 185541609139200.


Have seen the hang is somewhere within:
absoluteGregorianDay () / gregorianDateFromAbsolute () from
gnustep-base-1_24.dll.   These functions are used within the
descriptionWithCalendarFormat implementation, within a few while-loops.



While the "problem date" in the test may seem overboard, I still wouldn't
expect the hanging behavior.



GNUStep version: 1.24.6.
Platform: Windows.
GCC: 4.7.2.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 15 Mar 2016 04:35:59 PM GMT  Name: DateFormatTest.m  Size: 1kB   By:
sthompso
Sample source-code demonstrating the behavior is attached.
<http://savannah.gnu.org/bugs/download.php?file_id=36654>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47422>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.