<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>135231</bug_id>
          
          <creation_ts>2014-07-24 01:42:40 -0700</creation_ts>
          <short_desc>ASSERTION FAILED: (year &gt;= minYear &amp;&amp; year &lt;= maxYear) || (product - year == static_cast&lt;int&gt;(std::numeric_limits&lt;double&gt;::quiet_NaN())) in WTF::equivalentYearForDST</short_desc>
          <delta_ts>2016-08-03 14:37:58 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>116980</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Renata Hodovan">rhodovan.u-szeged</reporter>
          <assigned_to name="László Langó">llango.u-szeged</assigned_to>
          <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>ggaren</cc>
    
    <cc>llango.u-szeged</cc>
    
    <cc>mark.lam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1024463</commentid>
    <comment_count>0</comment_count>
    <who name="Renata Hodovan">rhodovan.u-szeged</who>
    <bug_when>2014-07-24 01:42:40 -0700</bug_when>
    <thetext>The following test causes the assertion failure:

new Date().setDate(7817338032789)

The backtrace:

ASSERTION FAILED: (year &gt;= minYear &amp;&amp; year &lt;= maxYear) || (product - year == static_cast&lt;int&gt;(std::numeric_limits&lt;double&gt;::quiet_NaN()))
../../Source/WTF/wtf/DateMath.cpp(362) : int WTF::equivalentYearForDST(int)
1   0x7ffff73b4662 /home/renifuzz/data/REPOS/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-3.0.so.0(WTFCrash+0x1e) [0x7ffff73b4662]
2   0x7ffff73b76fb /home/renifuzz/data/REPOS/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-3.0.so.0(_ZN3WTF20equivalentYearForDSTEi+0x10e) [0x7ffff73b76fb]
3   0x7ffff73b7740 /home/renifuzz/data/REPOS/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-3.0.so.0(_ZN3WTF24calculateLocalTimeOffsetEd+0x3b) [0x7ffff73b7740]
4   0x7ffff727f367 /home/renifuzz/data/REPOS/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-3.0.so.0(+0xda2367) [0x7ffff727f367]
5   0x7ffff727f4a7 /home/renifuzz/data/REPOS/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-3.0.so.0(_ZN3JSC21gregorianDateTimeToMSERNS_2VMERKN3WTF17GregorianDateTimeEdb+0x101) [0x7ffff727f4a7]
6   0x7ffff72553cb /home/renifuzz/data/REPOS/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-3.0.so.0(+0xd783cb) [0x7ffff72553cb]
7   0x7ffff725557d /home/renifuzz/data/REPOS/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-3.0.so.0(+0xd7857d) [0x7ffff725557d]
8   0x7fffb23ca0b4 [0x7fffb23ca0b4]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff73b4667 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:329
329	    *(int *)(uintptr_t)0xbbadbeef = 0;
(gdb) bt
#0  0x00007ffff73b4667 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:329
#1  0x00007ffff73b76fb in WTF::equivalentYearForDST (year=2061) at ../../Source/WTF/wtf/DateMath.cpp:362
#2  0x00007ffff73b7740 in WTF::calculateLocalTimeOffset (ms=6.7541800743709429e+20) at ../../Source/WTF/wtf/DateMath.cpp:478
#3  0x00007ffff727f367 in JSC::localTimeOffset (vm=..., ms=6.7541800743709429e+20) at ../../Source/JavaScriptCore/runtime/JSDateMath.cpp:183
#4  0x00007ffff727f4a7 in JSC::gregorianDateTimeToMS (vm=..., t=..., milliSeconds=6.7541800603296963e+20, inputIsUTC=false)
    at ../../Source/JavaScriptCore/runtime/JSDateMath.cpp:198
#5  0x00007ffff72553cb in JSC::setNewValueFromDateArgs (exec=0x7fffffffcdc0, numArgsToUse=1, inputIsUTC=false)
    at ../../Source/JavaScriptCore/runtime/DatePrototype.cpp:936
#6  0x00007ffff725557d in JSC::dateProtoFuncSetDate (exec=0x7fffffffcdc0) at ../../Source/JavaScriptCore/runtime/DatePrototype.cpp:992
#7  0x00007fffb23ca0b4 in ?? ()
#8  0x00007fffffffce10 in ?? ()
#9  0x00007ffff739e0c8 in llint_entry () from /home/renifuzz/data/REPOS/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-3.0.so.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1024753</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2014-07-24 19:58:06 -0700</bug_when>
    <thetext>Looks like a duplicate of bug 131248.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217208</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-08-03 14:37:58 -0700</bug_when>
    <thetext>This issue no longer occurs under GuardMalloc or ASAN as of r204037. If you believe there is still a bug, please reopen this issue with a revised test case.


I tested in the MiniBrowser JSC console:

&gt; new Date().setDate(7817338032789)
&lt; NaN</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>