#qi-hardware IRC log for Monday, 2012-09-24

Ayla_I'm losing my C22:49
Ayla_I have a structure named "Entry" on which I have a void *__p;22:49
Ayla_on a function, I have a *valid* pointer to a "struct Entry *" named e22:50
Ayla_and as soon as I do e->__ptr = something" it segfaults22:50
Fallenoua pointer to a "struct Entry *" or a pointer to a "struct Entry" ?22:50
Ayla_sorry, my mistake: a valid pointer to a "struct Entry"22:51
Fallenouso e->__ptr gives you a pointer (a void * one)22:51
Fallenouyou need to make sure this one is valid :)22:51
Fallenouand that you can write in it22:51
Ayla_I'm not deferencing it22:51
Fallenouoh right, sorry22:51
Fallenoumy bad22:51
Ayla_I want to update the pointer address22:51
Fallenouyeah so that should work indeed22:52
Ayla_ah, found the issue22:55
Ayla_the Entry structures are initialized outside of my lib; this time they were initialized with the "const" attribute22:55
Ayla_I believe GCC puts that on a read-only data area, if such a thing exists22:56
Fallenouaouch ok22:56
--- Tue Sep 25 201200:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!