Skip to content

Commit 631bb81

Browse files
committed
---
yaml --- r: 47613 b: refs/heads/incoming c: c22d0af h: refs/heads/master i: 47611: 6c0425f v: v3
1 parent 422f898 commit 631bb81

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: d67e144f685783503c1406cb4f28ea19d91d1fec
9+
refs/heads/incoming: c22d0af14c621a847e71dac7fe0e7fe19bf851a1
1010
refs/heads/dist-snap: 8b98e5a296d95c5e832db0756828e5bec31c6f50
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/rt/rust_builtin.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,13 @@ debug_opaque(type_desc *t, uint8_t *front) {
241241
rust_task *task = rust_get_current_task();
242242
LOG(task, stdlib, "debug_opaque");
243243
debug_tydesc_helper(t);
244-
// FIXME (#2667) may want to actually account for alignment.
245-
// `front` may not indeed be the front byte of the passed-in
246-
// argument.
247244
for (uintptr_t i = 0; i < t->size; ++front, ++i) {
245+
246+
// Account for alignment. `front` may not indeed be the
247+
// front byte of the passed-in argument
248+
if (((uintptr_t)front % t->align) != 0)
249+
front = (uint8_t *)align_to((uintptr_t)front, (size_t)t->align);
250+
248251
LOG(task, stdlib, " byte %" PRIdPTR ": 0x%" PRIx8, i, *front);
249252
}
250253
}

0 commit comments

Comments
 (0)