GNOME Bugzilla – Bug 693939
sourcescanner: Fix symbolic references in enum members
Last modified: 2015-02-07 16:49:59 UTC
While debugging some Shell code, I found that one of our enum members was wrong in introspection land. The enum in question looked like: typedef enum { SHELL_KEYBINDING_MODE_NONE = 0, SHELL_KEYBINDING_MODE_NORMAL = 1 << 0, SHELL_KEYBINDING_MODE_OVERVIEW = 1 << 1, /* ... */ SHELL_KEYBINDING_MODE_ALL = ~SHELL_KEYBINDING_MODE_NONE, } ShellKeyBindingMode; Looking into it, I found that the scanner was dealing with symbolic references in enum members badly, overwriting previous values if they existed. I don't know how memory is managed in the source scanner (but we seem to create new symbols and reuse old ones without refing in the same codepath, so I think it's already broken), so this patch may leak.
Created attachment 236347 [details] [review] sourcescanner: Remove unused "id" field
Created attachment 236348 [details] [review] sourcescanner: Fix symbolic references in enum members We need to copy the source symbols, otherwise we'll overwrite their values. This isn't good.
Review of attachment 236347 [details] [review]: Sure.
Review of attachment 236348 [details] [review]: This looks like a good fix; I'm not too concerned about leaking at this scale since we're just going to exit.
This was pushed at some point.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]