Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2020-08-28 20:38:05 +0300
committerCorinna Vinschen <corinna@vinschen.de>2020-08-28 20:38:05 +0300
commitbf251d5a0b644f7b5165a404822d88f532593160 (patch)
tree93d360aa5b9d8b1d5739c9f4ac30ad580d9836dc
parentb05b0b78fa91514473b092877da0f13be5a6b2c5 (diff)
Cygwin: sigproc: Fix a thinko in array size
We need one more entry than max children in the arrays. There's no reason to do this for the static array, though. One more entry in the overflow array is sufficient. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/sigproc.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index aa946fb4c..2a9734f00 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -47,14 +47,14 @@ char NO_COPY myself_nowait_dummy[1] = {'0'};
/* All my children info. Avoid expensive constructor ops at DLL startup */
class child_procs {
#ifdef __i386__
- static const int _NPROCS = 255;
+ static const int _NPROCS = 256;
static const int _NPROCS_2 = 1023;
#else
- static const int _NPROCS = 1023;
+ static const int _NPROCS = 1024;
static const int _NPROCS_2 = 4095;
#endif
int _count;
- uint8_t _procs[(_NPROCS + 1) * sizeof (pinfo)] __attribute__ ((__aligned__));
+ uint8_t _procs[_NPROCS * sizeof (pinfo)] __attribute__ ((__aligned__));
pinfo *_procs_2;
public:
int count () const { return _count; }