crypto/bn/bn_sqr.c:260: error: INTEGER_OVERFLOW_L2
  ([0, max(4294967295, `*t`)] - [0, max(4294967295, `*t`)]):unsigned64 by call to `bn_sub_words`.
Showing all 11 steps of the trace


crypto/bn/bn_sqr.c:200:1: Parameter `*t`
198.    * a[1]*b[1]
199.    */
200. > void bn_sqr_recursive(BN_ULONG *r, BN_ULONG *a, int n2, BN_ULONG *t)
201.   	{
202.   	int n=n2/2;

crypto/bn/bn_sqr.c:257:11: Call
255.   	 */
256.   
257.   	c1=(int)(bn_add_words(t,r,&(r[n2]),n2));
                 ^
258.   
259.   	/* t[32] is negative */

crypto/bn/bn_asm.c:340:1: Parameter `*r`
  338.   	}
  339.   #else /* !BN_LLONG */
  340. > BN_ULONG bn_add_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)
  341.           {
  342.   	BN_ULONG c,l,t;

crypto/bn/bn_sqr.c:260:12: Call
258.   
259.   	/* t[32] is negative */
260.   	c1-=(int)(bn_sub_words(&(t[n2]),t,&(t[n2]),n2));
                  ^
261.   
262.   	/* t[32] holds (a[0]-a[1])*(a[1]-a[0])+(a[0]*a[0])+(a[1]*a[1])

crypto/bn/bn_asm.c:390:1: <LHS trace>
388.   #endif /* !BN_LLONG */
389.   
390. > BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)
391.           {
392.   	BN_ULONG t1,t2;

crypto/bn/bn_asm.c:390:1: Parameter `*a`
  388.   #endif /* !BN_LLONG */
  389.   
  390. > BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)
  391.           {
  392.   	BN_ULONG t1,t2;

crypto/bn/bn_asm.c:400:3: Assignment
  398.   	for (;;)
  399.   		{
  400.   		t1=a[0]; t2=b[0];
           ^
  401.   		r[0]=(t1-t2-c)&BN_MASK2;
  402.   		if (t1 != t2) c=(t1 < t2);

crypto/bn/bn_asm.c:390:1: <RHS trace>
388.   #endif /* !BN_LLONG */
389.   
390. > BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)
391.           {
392.   	BN_ULONG t1,t2;

crypto/bn/bn_asm.c:390:1: Parameter `*b`
  388.   #endif /* !BN_LLONG */
  389.   
  390. > BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)
  391.           {
  392.   	BN_ULONG t1,t2;

crypto/bn/bn_asm.c:400:12: Assignment
  398.   	for (;;)
  399.   		{
  400.   		t1=a[0]; t2=b[0];
                    ^
  401.   		r[0]=(t1-t2-c)&BN_MASK2;
  402.   		if (t1 != t2) c=(t1 < t2);

crypto/bn/bn_asm.c:401:3: Binary operation: ([0, max(4294967295, *t)] - [0, max(4294967295, *t)]):unsigned64 by call to `bn_sub_words` 
  399.   		{
  400.   		t1=a[0]; t2=b[0];
  401.   		r[0]=(t1-t2-c)&BN_MASK2;
           ^
  402.   		if (t1 != t2) c=(t1 < t2);
  403.   		if (--n <= 0) break;

BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)
        {
	BN_ULONG t1,t2;
	int c=0;
	assert(n >= 0);
	if (n <= 0) return((BN_ULONG)0);
	for (;;)
		{
		t1=a[0]; t2=b[0];
		r[0]=(t1-t2-c)&BN_MASK2;
		if (t1 != t2) c=(t1 < t2);
		if (--n <= 0) break;
		t1=a[1]; t2=b[1];
		r[1]=(t1-t2-c)&BN_MASK2;
		if (t1 != t2) c=(t1 < t2);
		if (--n <= 0) break;
		t1=a[2]; t2=b[2];
		r[2]=(t1-t2-c)&BN_MASK2;
		if (t1 != t2) c=(t1 < t2);
		if (--n <= 0) break;
		t1=a[3]; t2=b[3];
		r[3]=(t1-t2-c)&BN_MASK2;
		if (t1 != t2) c=(t1 < t2);
		if (--n <= 0) break;
		a+=4;
		b+=4;
		r+=4;
		}
	return(c);
	}
['void bn_sqr_recursive(BN_ULONG *r, BN_ULONG *a, int n2, BN_ULONG *t)\n\t{\n\tint n=n2/2;\n\tint zero,c1;\n\tBN_ULONG ln,lo,*p;\n#ifdef BN_COUNT\nprintf(" bn_sqr_recursive %d * %d\\n",n2,n2);\n#endif\n\tif (n2 == 4)\n\t\t{\n#ifndef BN_SQR_COMBA\n\t\tbn_sqr_normal(r,a,4,t);\n#else\n\t\tbn_sqr_comba4(r,a);\n#endif\n\t\treturn;\n\t\t}\n\telse if (n2 == 8)\n\t\t{\n#ifndef BN_SQR_COMBA\n\t\tbn_sqr_normal(r,a,8,t);\n#else\n\t\tbn_sqr_comba8(r,a);\n#endif\n\t\treturn;\n\t\t}\n\tif (n2 < BN_SQR_RECURSIVE_SIZE_NORMAL)\n\t\t{\n\t\tbn_sqr_normal(r,a,n2,t);\n\t\treturn;\n\t\t}\n\tc1=bn_cmp_words(a,&(a[n]),n);\n\tzero=0;\n\tif (c1 > 0)\n\t\tbn_sub_words(t,a,&(a[n]),n);\n\telse if (c1 < 0)\n\t\tbn_sub_words(t,&(a[n]),a,n);\n\telse\n\t\tzero=1;\n\tp= &(t[n2*2]);\n\tif (!zero)\n\t\tbn_sqr_recursive(&(t[n2]),t,n,p);\n\telse\n\t\tmemset(&(t[n2]),0,n*sizeof(BN_ULONG));\n\tbn_sqr_recursive(r,a,n,p);\n\tbn_sqr_recursive(&(r[n2]),&(a[n]),n,p);\n\tc1=(int)(bn_add_words(t,r,&(r[n2]),n2));\n\tc1-=(int)(bn_sub_words(&(t[n2]),t,&(t[n2]),n2));\n\tc1+=(int)(bn_add_words(&(r[n]),&(r[n]),&(t[n2]),n2));\n\tif (c1)\n\t\t{\n\t\tp= &(r[n+n2]);\n\t\tlo= *p;\n\t\tln=(lo+c1)&BN_MASK2;\n\t\t*p=ln;\n\t\tif (ln < (BN_ULONG)c1)\n\t\t\t{\n\t\t\tdo\t{\n\t\t\t\tp++;\n\t\t\t\tlo= *p;\n\t\t\t\tln=(lo+1)&BN_MASK2;\n\t\t\t\t*p=ln;\n\t\t\t\t} while (ln == 0);\n\t\t\t}\n\t\t}\n\t}', 'BN_ULONG bn_add_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)\n        {\n\tBN_ULONG c,l,t;\n\tassert(n >= 0);\n\tif (n <= 0) return((BN_ULONG)0);\n\tc=0;\n\tfor (;;)\n\t\t{\n\t\tt=a[0];\n\t\tt=(t+c)&BN_MASK2;\n\t\tc=(t < c);\n\t\tl=(t+b[0])&BN_MASK2;\n\t\tc+=(l < t);\n\t\tr[0]=l;\n\t\tif (--n <= 0) break;\n\t\tt=a[1];\n\t\tt=(t+c)&BN_MASK2;\n\t\tc=(t < c);\n\t\tl=(t+b[1])&BN_MASK2;\n\t\tc+=(l < t);\n\t\tr[1]=l;\n\t\tif (--n <= 0) break;\n\t\tt=a[2];\n\t\tt=(t+c)&BN_MASK2;\n\t\tc=(t < c);\n\t\tl=(t+b[2])&BN_MASK2;\n\t\tc+=(l < t);\n\t\tr[2]=l;\n\t\tif (--n <= 0) break;\n\t\tt=a[3];\n\t\tt=(t+c)&BN_MASK2;\n\t\tc=(t < c);\n\t\tl=(t+b[3])&BN_MASK2;\n\t\tc+=(l < t);\n\t\tr[3]=l;\n\t\tif (--n <= 0) break;\n\t\ta+=4;\n\t\tb+=4;\n\t\tr+=4;\n\t\t}\n\treturn((BN_ULONG)c);\n\t}', 'BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)\n        {\n\tBN_ULONG t1,t2;\n\tint c=0;\n\tassert(n >= 0);\n\tif (n <= 0) return((BN_ULONG)0);\n\tfor (;;)\n\t\t{\n\t\tt1=a[0]; t2=b[0];\n\t\tr[0]=(t1-t2-c)&BN_MASK2;\n\t\tif (t1 != t2) c=(t1 < t2);\n\t\tif (--n <= 0) break;\n\t\tt1=a[1]; t2=b[1];\n\t\tr[1]=(t1-t2-c)&BN_MASK2;\n\t\tif (t1 != t2) c=(t1 < t2);\n\t\tif (--n <= 0) break;\n\t\tt1=a[2]; t2=b[2];\n\t\tr[2]=(t1-t2-c)&BN_MASK2;\n\t\tif (t1 != t2) c=(t1 < t2);\n\t\tif (--n <= 0) break;\n\t\tt1=a[3]; t2=b[3];\n\t\tr[3]=(t1-t2-c)&BN_MASK2;\n\t\tif (t1 != t2) c=(t1 < t2);\n\t\tif (--n <= 0) break;\n\t\ta+=4;\n\t\tb+=4;\n\t\tr+=4;\n\t\t}\n\treturn(c);\n\t}']