aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-10-07 12:18:40 +0200
committerPatrik Nyblom <[email protected]>2010-10-07 12:18:40 +0200
commitf538ae0a22dabe5f5b0e40e0660aeaea0f5c0768 (patch)
treed28d88d91769c6f25ae4788505ccad6af6237eaf /erts
parentb4a8bc73a9adf3db50a29feb53b64b65ba88c3a2 (diff)
parent3ffb56672f9b51c5e1080c53b62a3e60983dfdfc (diff)
downloadotp-f538ae0a22dabe5f5b0e40e0660aeaea0f5c0768.tar.gz
otp-f538ae0a22dabe5f5b0e40e0660aeaea0f5c0768.tar.bz2
otp-f538ae0a22dabe5f5b0e40e0660aeaea0f5c0768.zip
Merge branch 'maint-r14' into dev
Conflicts: erts/vsn.mk
Diffstat (limited to 'erts')
-rw-r--r--erts/doc/src/notes.xml19
-rw-r--r--erts/lib_src/common/erl_misc_utils.c15
2 files changed, 29 insertions, 5 deletions
diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml
index efe2dada9c..532ebc29e2 100644
--- a/erts/doc/src/notes.xml
+++ b/erts/doc/src/notes.xml
@@ -30,6 +30,25 @@
</header>
<p>This document describes the changes made to the ERTS application.</p>
+<section><title>Erts 5.8.1.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Windows 2003 and Windows XP pre SP3 would sometimes not
+ start the Erlang R14B VM at all due to a bug in the cpu
+ topology detection. The bug affects Windows only, no
+ other platform is even remotely affected. The bug is now
+ corrected.</p>
+ <p>
+ Own Id: OTP-8876</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Erts 5.8.1</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/erts/lib_src/common/erl_misc_utils.c b/erts/lib_src/common/erl_misc_utils.c
index 116c9886d8..498ce6837a 100644
--- a/erts/lib_src/common/erl_misc_utils.c
+++ b/erts/lib_src/common/erl_misc_utils.c
@@ -1228,7 +1228,10 @@ read_topology(erts_cpu_info_t *cpuinfo)
nodes++;
}
- core_id = malloc(sizeof(int)*(packages ? packages : 1));
+ if (!packages) {
+ packages = 1;
+ }
+ core_id = malloc(sizeof(int)*packages);
if (!core_id) {
res = -ENOMEM;
goto error;
@@ -1286,11 +1289,13 @@ read_topology(erts_cpu_info_t *cpuinfo)
* Nodes and packages may not be supported; pretend
* that there are one if this is the case...
*/
- if (!nodes)
- cpuinfo->topology[l].node = 0;
- if (!packages)
- cpuinfo->topology[l].processor = 0;
if (slpip[rix].ProcessorMask & (((ULONG_PTR) 1) << l)) {
+ if (!nodes) {
+ cpuinfo->topology[l].node = 0;
+ }
+ if (!packages) {
+ cpuinfo->topology[l].processor = 0;
+ }
if (processor < 0) {
processor = cpuinfo->topology[l].processor;
if (processor < 0) {