After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 562892 - happy valgrind
happy valgrind
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2008-12-01 17:59 UTC by Colin Walters
Modified: 2008-12-01 18:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix iteration (1.56 KB, patch)
2008-12-01 18:06 UTC, Colin Walters
none Details | Review
more commented, cleaner (1.76 KB, patch)
2008-12-01 18:13 UTC, Colin Walters
none Details | Review
simpler patch (715 bytes, patch)
2008-12-01 18:45 UTC, Colin Walters
none Details | Review

Description Colin Walters 2008-12-01 17:59:51 UTC
Valgrind has been complaining on x86_64 for a long time about the get_obj_key function, and since it was extremely noisy for me and obscured other (more important) errors I decided to track it down.

Basically, the previous logic was too simple to work.  We were walking off the end of d.bytes by iterating up to i < sizeof(void*)*2, where d.bytes is just 0 < sizeof(void*).  Why it wasn't complaining on x86 probably comes down to something else living on the stack there that was assigned.

To be correct we separate iteration for each repetition of the address from iteration over the components of d.
Comment 1 Colin Walters 2008-12-01 18:06:02 UTC
Created attachment 123747 [details] [review]
fix iteration
Comment 2 Colin Walters 2008-12-01 18:13:47 UTC
Created attachment 123748 [details] [review]
more commented, cleaner

No functional changes here, just makes the i/j ordering more traditional, and adds a comment.
Comment 3 Colin Walters 2008-12-01 18:45:57 UTC
Created attachment 123751 [details] [review]
simpler patch
Comment 4 Colin Walters 2008-12-01 18:49:46 UTC
Committed r124
	M	gi/object.c
r124 = 1a8e633fa4b919faec86733e23332ab55b425cb9 (git-svn)