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 691812 - gioinputstream - give task as callback_data not task_data
gioinputstream - give task as callback_data not task_data
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.35.x
Other Linux
: Normal major
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-01-15 23:21 UTC by Alban Browaeys
Modified: 2013-01-16 15:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
give task as callback_data not task_data (1.39 KB, patch)
2013-01-15 23:21 UTC, Alban Browaeys
committed Details | Review

Description Alban Browaeys 2013-01-15 23:21:49 UTC
Created attachment 233554 [details] [review]
give task as callback_data not task_data

g_task_return_now pass task->callback_data as user_data, at least gio/ginputstream.c skip_callback_wrapper expect this user_data to be the task itself .It then extract the task_data  from this task

if I gdb , and cast the user_data to SkipFallbackAsyncData * instead of GTask * (ie task data instead of task itself) I get proper data ... but skip_callback_wrapper also need the task itelf.

with current glib WebKitWebProcess crash for me at epiphany startup :

Core was generated by `/opt/gnome/libexec/WebKitWebProcess 15'.
Program terminated with signal 11, Segmentation fault.
  • #0 skip_callback_wrapper
    at /home/prahal/checkout/gnome/glib/gio/ginputstream.c line 1227
  • #0 skip_callback_wrapper
    at /home/prahal/checkout/gnome/glib/gio/ginputstream.c line 1227
  • #1 g_task_return_now
    at /home/prahal/checkout/gnome/glib/gio/gtask.c line 1105
  • #2 complete_in_idle_cb
    at /home/prahal/checkout/gnome/glib/gio/gtask.c line 1114
  • #3 g_idle_dispatch
    at /home/prahal/checkout/gnome/glib/glib/gmain.c line 4887
  • #4 g_main_dispatch
    at /home/prahal/checkout/gnome/glib/glib/gmain.c line 2784
  • #5 g_main_context_dispatch
    at /home/prahal/checkout/gnome/glib/glib/gmain.c line 3288
  • #6 g_main_context_iterate
    at /home/prahal/checkout/gnome/glib/glib/gmain.c line 3359
  • #7 g_main_loop_run
    at /home/prahal/checkout/gnome/glib/glib/gmain.c line 3553
  • #8 WebProcessMainGtk
    from /opt/gnome/lib64/libwebkit2gtk-3.0.so.0
  • #9 __libc_start_main
    at libc-start.c line 227
  • #10 _start
  • #1 g_task_return_now
    at /home/prahal/checkout/gnome/glib/gio/gtask.c line 1105
  • #0 skip_callback_wrapper
    at /home/prahal/checkout/gnome/glib/gio/ginputstream.c line 1227



(gdb) p (SkipFallbackAsyncData *)user_data
$5 = (SkipFallbackAsyncData *) 0x16d9320
(gdb) p *(SkipFallbackAsyncData *)user_data
$6 = {
  buffer = "<HEAD><TITLE>Redirect</TITLE></HEAD>\n<BODY BGCOLOR=\"white\" FGCOLOR=\"black\">\n<FONT FACE=\"Helvetica,Arial\"><B>\n \" (...)
9223372036854775807, count_skipped = 0}
Comment 1 Dan Winship 2013-01-16 14:19:23 UTC
Comment on attachment 233554 [details] [review]
give task as callback_data not task_data

yeah, this is right, but let me add a test case for it before committing...
Comment 2 Dan Winship 2013-01-16 15:35:35 UTC
pushed, along with some tests. thanks for the patch