Hi,
I found another segfault in my app with gdb:
Code:
Program received signal SIGSEGV, Segmentation fault.
0x0804cb3e in main (argc=1, argv=0xbfc71904) at main.c:978
978 _check_prg = _check_node->data;
(gdb)
I then made a
Code:
(gdb) inspect _check_node->data
Cannot access memory at address 0xda1
which is kinda weird as the code looks like
Code:
while (_check_node != NULL) {
_check_prg = _check_node->data;
and _check_node was allocated like:
head = (node_t *) malloc(sizeof(node_t)); (it is of type node_t*)
This is from code that's not written by myself but now how can I verify that _check_node->data is accessible without running into a seg fault?
Would if (_check_node->data) do it? I think that would throw a seg fault too, when it tries to access that memory block, no?
Thanks,
Ron