Hi,
I found another segfault in my app with gdb:
I then made aCode:Program received signal SIGSEGV, Segmentation fault. 0x0804cb3e in main (argc=1, argv=0xbfc71904) at main.c:978 978 _check_prg = _check_node->data; (gdb)
which is kinda weird as the code looks likeCode:(gdb) inspect _check_node->data Cannot access memory at address 0xda1
and _check_node was allocated like:Code:while (_check_node != NULL) { _check_prg = _check_node->data;
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



LinkBack URL
About LinkBacks




well... i'll do my best...
). No point in banging your head against the wall.