Skip to content

Commit 94719ec

Browse files
committed
Revert vector
1 parent e4bc3f6 commit 94719ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/memray/_memray/ghost_stack/src/ghost_stack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ class GhostStackImpl {
381381
// Copy to output buffer - return the IP of each frame (what unw_backtrace returns)
382382
size_t count = (entries_.size() < max_frames) ? entries_.size() : max_frames;
383383
for (size_t i = 0; i < count; ++i) {
384-
buffer[i] = reinterpret_cast<void*>(entries_[i].ip);
384+
buffer[i] = reinterpret_cast<void*>(entries_[count - 1 - i].ip);
385385
}
386386

387387
LOG_DEBUG("Captured %zu frames\n", count);

0 commit comments

Comments
 (0)