| Ayla_ | guys | 22:49 |
|---|---|---|
| Ayla_ | I'm losing my C | 22: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 e | 22:50 |
| Ayla_ | and as soon as I do e->__ptr = something" it segfaults | 22:50 |
| Fallenou | a 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 |
| Fallenou | so e->__ptr gives you a pointer (a void * one) | 22:51 |
| Fallenou | you need to make sure this one is valid :) | 22:51 |
| Fallenou | and that you can write in it | 22:51 |
| Ayla_ | I'm not deferencing it | 22:51 |
| Fallenou | oh right, sorry | 22:51 |
| Fallenou | my bad | 22:51 |
| Ayla_ | I want to update the pointer address | 22:51 |
| Fallenou | yeah so that should work indeed | 22:52 |
| Ayla_ | ah, found the issue | 22:55 |
| Ayla_ | the Entry structures are initialized outside of my lib; this time they were initialized with the "const" attribute | 22:55 |
| Ayla_ | I believe GCC puts that on a read-only data area, if such a thing exists | 22:56 |
| Fallenou | aouch ok | 22:56 |
| --- Tue Sep 25 2012 | 00:00 | |
Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!