@@ -63,13 +63,6 @@ struct chunk_begin {
63
63
64
64
} __attribute__((packed ));
65
65
66
- struct chunk_struct {
67
- struct chunk_begin begin ;
68
- char redzone [REDZONE_SIZE ];
69
- size_t prev_size_padding ;
70
-
71
- } __attribute__((packed ));
72
-
73
66
#ifdef USE_LIBC_ALLOC
74
67
75
68
void * (* __lq_libc_memalign )(size_t , size_t );
@@ -177,14 +170,14 @@ void *__libqasan_malloc(size_t size) {
177
170
178
171
struct chunk_begin * p = backend_memalign (
179
172
ALLOC_ALIGN_SIZE ,
180
- sizeof (struct chunk_struct ) + qasan_align_up (size , ALLOC_ALIGN_SIZE ));
173
+ sizeof (struct chunk_begin ) + qasan_align_up (size , ALLOC_ALIGN_SIZE ));
181
174
182
175
QASAN_SWAP (state );
183
176
184
177
if (!p ) return NULL ;
185
178
186
179
QASAN_UNPOISON (
187
- p , sizeof (struct chunk_struct ) + qasan_align_up (size , ALLOC_ALIGN_SIZE ));
180
+ p , sizeof (struct chunk_begin ) + qasan_align_up (size , ALLOC_ALIGN_SIZE ));
188
181
189
182
p -> requested_size = size ;
190
183
p -> aligned_orig = NULL ;
@@ -281,13 +274,13 @@ int __libqasan_posix_memalign(void **ptr, size_t align, size_t len) {
281
274
282
275
char * orig = backend_memalign (
283
276
ALLOC_ALIGN_SIZE ,
284
- sizeof (struct chunk_struct ) + qasan_align_up (size , ALLOC_ALIGN_SIZE ));
277
+ sizeof (struct chunk_begin ) + qasan_align_up (size , ALLOC_ALIGN_SIZE ));
285
278
286
279
QASAN_SWAP (state );
287
280
288
281
if (!orig ) return ENOMEM ;
289
282
290
- QASAN_UNPOISON (orig , sizeof (struct chunk_struct ) +
283
+ QASAN_UNPOISON (orig , sizeof (struct chunk_begin ) +
291
284
qasan_align_up (size , ALLOC_ALIGN_SIZE ));
292
285
293
286
char * data = orig + sizeof (struct chunk_begin );
0 commit comments