diff options
author | Sverker Eriksson <[email protected]> | 2012-03-20 16:09:44 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-03-20 16:10:07 +0100 |
commit | f224641b6c6015f26c70a05efb71e5d952c2f0d9 (patch) | |
tree | 20027f861189f6ce3a46b32d2e87391bdbf3da0e /erts | |
parent | 75c1050ae68d6914cf9be4f7e7267c0c4b12f157 (diff) | |
parent | 8c34a2dc70070cca8d97ad3c0f2dfbec1a0d82d8 (diff) | |
download | otp-f224641b6c6015f26c70a05efb71e5d952c2f0d9.tar.gz otp-f224641b6c6015f26c70a05efb71e5d952c2f0d9.tar.bz2 otp-f224641b6c6015f26c70a05efb71e5d952c2f0d9.zip |
Merge branch 'sverk/cpu-topology-crash' into maint
* sverk/cpu-topology-crash:
erts: Fix memory corruption when reading topology info
OTP-10004
Diffstat (limited to 'erts')
-rw-r--r-- | erts/lib_src/common/erl_misc_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/lib_src/common/erl_misc_utils.c b/erts/lib_src/common/erl_misc_utils.c index 4806311dfe..162c908285 100644 --- a/erts/lib_src/common/erl_misc_utils.c +++ b/erts/lib_src/common/erl_misc_utils.c @@ -727,7 +727,7 @@ adjust_processor_nodes(erts_cpu_info_t *cpuinfo, int no_nodes) prev = NULL; this = &cpuinfo->topology[0]; - last = &cpuinfo->topology[cpuinfo->configured-1]; + last = &cpuinfo->topology[cpuinfo->topology_size-1]; while (1) { if (processor == this->processor) { if (node != this->node) @@ -939,7 +939,7 @@ read_topology(erts_cpu_info_t *cpuinfo) if (res > 1) { prev = this++; - last = &cpuinfo->topology[cpuinfo->configured-1]; + last = &cpuinfo->topology[cpuinfo->topology_size-1]; while (1) { this->thread = ((this->node == prev->node @@ -1094,7 +1094,7 @@ read_topology(erts_cpu_info_t *cpuinfo) if (res > 1) { prev = this++; - last = &cpuinfo->topology[cpuinfo->configured-1]; + last = &cpuinfo->topology[cpuinfo->topology_size-1]; while (1) { this->thread = ((this->node == prev->node |