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

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-08-24 03:06:49 +0300
committerJames M Snell <jasnell@gmail.com>2017-08-24 05:01:19 +0300
commit86c4655a0fbeeaa29c49d5537e190f6cdedfd4d8 (patch)
treeccb0b7df152b116bf2ed45cfa19b575a81f9b192 /src/node_perf_common.h
parentc40229a9b80736f1fdb31fac169b70a1d6af8669 (diff)
src: fix build on certain platforms
The `double` fields in `performance_state` could previously have been aligned at 4-byte instead of 8-byte boundaries, which would have made creating an Float64Array them as a array buffer view for an ArrayBuffer extending over the entire struct an invalid operation. Ref: 67269fd7f33279699b1ae71225f3d738518c844c Comments out related flaky failure PR-URL: https://github.com/nodejs/node/pull/14996 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'src/node_perf_common.h')
-rw-r--r--src/node_perf_common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_perf_common.h b/src/node_perf_common.h
index 30efcb6134b..dc884cac97c 100644
--- a/src/node_perf_common.h
+++ b/src/node_perf_common.h
@@ -61,8 +61,9 @@ enum PerformanceEntryType {
} while (0);
struct performance_state {
- uint32_t observers[NODE_PERFORMANCE_ENTRY_TYPE_INVALID];
+ // doubles first so that they are always sizeof(double)-aligned
double milestones[NODE_PERFORMANCE_MILESTONE_INVALID];
+ uint32_t observers[NODE_PERFORMANCE_ENTRY_TYPE_INVALID];
};
} // namespace performance