Skip to content

Commit e68b9f5

Browse files
committed
---
yaml --- r: 46204 b: refs/heads/auto c: c22d0af h: refs/heads/master v: v3
1 parent 69d1c6a commit e68b9f5

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
@@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: d67e144f685783503c1406cb4f28ea19d91d1fec
17+
refs/heads/auto: c22d0af14c621a847e71dac7fe0e7fe19bf851a1

branches/auto/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)