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 611585 - Attempts to free stack allocated arguments
Attempts to free stack allocated arguments
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-02 12:32 UTC by Tommi Komulainen
Modified: 2010-03-02 22:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gi: make sure to release correct arguments (1.31 KB, patch)
2010-03-02 12:32 UTC, Tommi Komulainen
accepted-commit_now Details | Review

Description Tommi Komulainen 2010-03-02 12:32:41 UTC
Make check fails due to glibc detecting invalid free when testing
test_int_out_utf8:

  gjs-unit: free(): invalid pointer: 0xbfff2400 ***

The pointer looks like being the stack allocated OUT argument.

Possibly caused by 32faf0da134a3fac866be270fafbc414b9d721a9
Comment 1 Tommi Komulainen 2010-03-02 12:32:43 UTC
Created attachment 155029 [details] [review]
gi: make sure to release correct arguments

All arguments are IN arguments as they're in in_arg_cvalue and
in_arg_pointers arrays so always increase the index to the arrays to
ensure the correct argument gets released.

Avoids trying to free stack allocated out value.
Comment 2 Johan (not receiving bugmail) Dahlin 2010-03-02 15:43:08 UTC
Review of attachment 155029 [details] [review]:

Looks good