Skip to content

Commit 2d2e418

Browse files
committed
chore: Update vendored sources to duckdb/duckdb@ef62c27
Merge pull request duckdb/duckdb#11306 from Maxxen/bugfixes
1 parent f000c70 commit 2d2e418

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

src/duckdb/src/core_functions/aggregate/nested/list.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ static void ListUpdateFunction(Vector inputs[], AggregateInputData &aggr_input_d
6363

6464
for (idx_t i = 0; i < count; i++) {
6565
auto &state = *states[states_data.sel->get_index(i)];
66+
aggr_input_data.allocator.AlignNext();
6667
list_bind_data.functions.AppendRow(aggr_input_data.allocator, state.linked_list, input_data, i);
6768
}
6869
}
@@ -178,6 +179,7 @@ static void ListCombineFunction(Vector &states_vector, Vector &combined, Aggrega
178179
Vector::RecursiveToUnifiedFormat(input, entry_count, input_data);
179180

180181
for (idx_t entry_idx = 0; entry_idx < entry_count; ++entry_idx) {
182+
aggr_input_data.allocator.AlignNext();
181183
list_bind_data.functions.AppendRow(aggr_input_data.allocator, target.linked_list, input_data, entry_idx);
182184
}
183185
}

src/duckdb/src/function/table/version/pragma_version.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef DUCKDB_PATCH_VERSION
2-
#define DUCKDB_PATCH_VERSION "2-dev154"
2+
#define DUCKDB_PATCH_VERSION "2-dev156"
33
#endif
44
#ifndef DUCKDB_MINOR_VERSION
55
#define DUCKDB_MINOR_VERSION 10
@@ -8,10 +8,10 @@
88
#define DUCKDB_MAJOR_VERSION 0
99
#endif
1010
#ifndef DUCKDB_VERSION
11-
#define DUCKDB_VERSION "v0.10.2-dev154"
11+
#define DUCKDB_VERSION "v0.10.2-dev156"
1212
#endif
1313
#ifndef DUCKDB_SOURCE_ID
14-
#define DUCKDB_SOURCE_ID "9bc963f1a4"
14+
#define DUCKDB_SOURCE_ID "ef62c27528"
1515
#endif
1616
#include "duckdb/function/table/system_functions.hpp"
1717
#include "duckdb/main/database.hpp"

src/duckdb/src/include/duckdb/storage/arena_allocator.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class ArenaAllocator {
3737
DUCKDB_API data_ptr_t AllocateAligned(idx_t size);
3838
DUCKDB_API data_ptr_t ReallocateAligned(data_ptr_t pointer, idx_t old_size, idx_t size);
3939

40+
//! Increment the internal cursor (if required) so the next allocation is guaranteed to be aligned to 8 bytes
41+
DUCKDB_API void AlignNext();
42+
4043
//! Resets the current head and destroys all previous arena chunks
4144
DUCKDB_API void Reset();
4245
DUCKDB_API void Destroy();

src/duckdb/src/storage/arena_allocator.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,20 @@ data_ptr_t ArenaAllocator::Reallocate(data_ptr_t pointer, idx_t old_size, idx_t
101101
}
102102
}
103103

104+
void ArenaAllocator::AlignNext() {
105+
if (head && !ValueIsAligned<idx_t>(head->current_position)) {
106+
// move the current position forward so that the next allocation is aligned
107+
head->current_position = AlignValue<idx_t>(head->current_position);
108+
}
109+
}
110+
104111
data_ptr_t ArenaAllocator::AllocateAligned(idx_t size) {
112+
AlignNext();
105113
return Allocate(AlignValue<idx_t>(size));
106114
}
107115

108116
data_ptr_t ArenaAllocator::ReallocateAligned(data_ptr_t pointer, idx_t old_size, idx_t size) {
117+
AlignNext();
109118
return Reallocate(pointer, old_size, AlignValue<idx_t>(size));
110119
}
111120

0 commit comments

Comments
 (0)