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 736780 - [PATCH] load_device_factories SEGFAULT due to bad cast
[PATCH] load_device_factories SEGFAULT due to bad cast
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-09-17 06:57 UTC by Lubomir Rintel
Modified: 2014-09-17 09:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] core: Fix casting of factory type (1.17 KB, patch)
2014-09-17 06:57 UTC, Lubomir Rintel
none Details | Review
[PATCH v2] core: Fix casting of factory type (1.61 KB, text/plain)
2014-09-17 08:52 UTC, Lubomir Rintel
  Details
[PATCH v3] core: Fix casting of factory type (1.04 KB, patch)
2014-09-17 08:55 UTC, Lubomir Rintel
accepted-commit_now Details | Review

Description Lubomir Rintel 2014-09-17 06:57:51 UTC
Created attachment 286341 [details] [review]
[PATCH] core: Fix casting of factory type

See attached patch.

Traceback:

Program received signal SIGSEGV, Segmentation fault.
0x00007fb049544c42 in g_type_fundamental (type_id=type_id@entry=1320500320) at gtype.c:3960
3960	  return node ? NODE_FUNDAMENTAL_TYPE (node) : 0;
Missing separate debuginfos, use: debuginfo-install dbus-glib-0.100.2-2.fc20.x86_64 glibc-2.18-14.fc20.x86_64 gvfs-1.18.3-3.fc20.x86_64 libbluray-0.6.1-1.fc20.x86_64 libndp-1.4-1.fc20.x86_64 libnl3-3.2.24-3.fc20.x86_64 libsoup-2.44.2-1.fc20.x86_64 libuuid-2.24.2-1.fc20.x86_64 libxml2-2.9.1-2.fc20.x86_64 nspr-4.10.7-1.fc20.x86_64 nss-3.17.0-1.fc20.x86_64 nss-softokn-3.17.0-1.fc20.x86_64 nss-softokn-freebl-3.17.0-1.fc20.x86_64 nss-util-3.17.0-1.fc20.x86_64 polkit-0.112-2.fc20.x86_64 readline-6.2-10.fc20.x86_64 sqlite-3.8.6-2.fc20.x86_64
(gdb) bt
  • #0 g_type_fundamental
    at gtype.c line 3960
  • #1 g_object_new
    at gobject.c line 1552
  • #2 load_device_factories
    at nm-manager.c line 2000
  • #3 nm_manager_new
    at nm-manager.c line 4715
  • #4 main
    at main.c line 618

Comment 1 Jiri Klimes 2014-09-17 08:27:36 UTC
The patch is OK.
Just nitpicking, any reason to use g_slist_next instead of direct next access?
NM code style puts a space before opening parenthesis.
Comment 2 Lubomir Rintel 2014-09-17 08:52:29 UTC
Created attachment 286347 [details]
[PATCH v2] core: Fix casting of factory type

(In reply to comment #1)
> The patch is OK.
> Just nitpicking, any reason to use g_slist_next instead of direct next access?
> NM code style puts a space before opening parenthesis.

Not good reason really; just a leftover from debugging (I initially thought it's not okay to access the next pointer directly).

Attaching a version without that unnecessary change.
Comment 3 Lubomir Rintel 2014-09-17 08:55:54 UTC
Created attachment 286348 [details] [review]
[PATCH v3] core: Fix casting of factory type

whoops
Comment 4 Jiri Klimes 2014-09-17 09:31:57 UTC
Review of attachment 286348 [details] [review]:

OK
Comment 5 Jiri Klimes 2014-09-17 09:32:53 UTC
Pushed to master:  b05c8db core: fix casting of factory type (bgo #736780)