components/pcsc-lite/patches/10-stack_size.patch
author John Beck <John.Beck@Oracle.COM>
Tue, 01 Nov 2016 10:58:55 -0700
changeset 7228 2d4b503f0914
parent 6256 171e3b6f4bed
permissions -rw-r--r--
25029083 do not publish accerciser when BUILD_TYPE=evaluation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6256
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     1
In-house patch addressing a problem with too low thread stack size.
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     2
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     3
Although this patch is not Solaris specific, it addresses Solaris
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     4
specific problem. Fixed in upstream:
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     5
https://anonscm.debian.org/cgit/pcsclite/PCSC.git/commit/?id=e78449ce37f453516e46d78ad0b99e01db32727b
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     6
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     7
--- pcsc-lite-1.8.14/src/utils.c.orig	2016-06-17 00:40:26.540451706 -0700
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     8
+++ pcsc-lite-1.8.14/src/utils.c	2016-06-17 00:41:09.902613641 -0700
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
     9
@@ -170,7 +170,7 @@
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    10
 	if (ret)
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    11
 		goto error;
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    12
 
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    13
-	if (stack_size < 0x40000)
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    14
+	if ((stack_size != 0) && (stack_size < 0x40000))
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    15
 	{
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    16
 		stack_size = 0x40000;
171e3b6f4bed 23586549 pcscd creates threads with way too low stack size
Ivo Raisr <ivo.raisr@oracle.com>
parents:
diff changeset
    17
 		ret = pthread_attr_setstacksize(&attr, stack_size);