Jun 5, 2017 05:01 AM
(This post was last modified: Jun 5, 2017 06:23 AM by Left Boy.)
Hey,
i currently trying to build a stack using a linked list (in C) but struggeling to implement the push operation
LI* t = malloc(sizeof(LI));
t->data = data;
t->next = s->head;
s->head = t;
[/code]
im getting the following error, can somebody help me?
i currently trying to build a stack using a linked list (in C) but struggeling to implement the push operation
LI* t = malloc(sizeof(LI));
t->data = data;
t->next = s->head;
s->head = t;
[/code]
im getting the following error, can somebody help me?
Code
FAIL: AddressSanitizer error
src/list.c:169:23: runtime error: member access within misaligned address 0x00000001 for type 'struct LI', which requires 4 byte alignment

