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 769789 - int to GValue conversion silently truncates
int to GValue conversion silently truncates
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-12 10:09 UTC by Christoph Reiter (lazka)
Modified: 2017-04-01 09:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GValue: add overflow checking for py -> gint; forward marshaling exceptions (2.85 KB, patch)
2017-03-27 04:45 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Christoph Reiter (lazka) 2016-08-12 10:09:34 UTC
This came up in bug 769532

----

from gi.repository import GObject
a = GObject.ValueArray()
a.append(10**10) # this should raise (or at least warn)
print a.get_nth(0) # this prints 10**10 & 2**31-1 instead of 10**10
Comment 1 Christoph Reiter (lazka) 2017-03-27 04:45:29 UTC
Created attachment 348766 [details] [review]
GValue: add overflow checking for py -> gint; forward marshaling exceptions