Hi, On 6 February 2015 at 08:24, Maciej Fijalkowski <fijall at gmail.com> wrote: > I don't think it's safe to assume f_code is properly filled by the > time you might read it, depending a bit where you find the frame > object. Are you sure it's not full of garbage? Yes, before discussing how to do the utf8 decoding, we should realize that it is really unsafe code starting from the line before. From a signal handler you're only supposed to read data that was written to "volatile" fields. So even PyEval_GetFrame(), which is done by reading the thread state's "frame" field, is not safe: this is not a volatile. This means that the compiler is free to do crazy things like *first* write into this field and *then* initialize the actual content of the frame. The uninitialized content may be garbage, not just NULLs. A bientôt, Armin.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4