php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37304 corrupted double-linked list when dragging
Submitted: 2006-05-04 12:06 UTC Modified: 2006-08-05 19:49 UTC
From: cweiske@php.net Assigned:
Status: Closed Package: PHP-GTK related
PHP Version: 5.1.3 OS: Linux/Gentoo
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cweiske@php.net
New email:
PHP Version: OS:

 

 [2006-05-04 12:06 UTC] cweiske@php.net
Description:
------------
When dragging 3x from the window to itself, php crashes. You need to apply the GtkSelectionData get_uris/set_uris patch I sent to php-gtk-dev today first.

Reproduce code:
---------------
<?php
$wnd = new GtkWindow();
$wnd->connect_simple('destroy', array('Gtk', 'main_quit'));
$wnd->drag_source_set(Gdk::BUTTON1_MASK, array(), Gdk::ACTION_COPY);


$wnd->drag_source_set(
    Gdk::BUTTON1_MASK,
    array(array('text/uri-list', 0, 0)),
    Gdk::ACTION_COPY
);
$wnd->drag_dest_set(
    Gtk::DEST_DEFAULT_ALL,
    array(array('text/uri-list', 0, 0)),
    Gdk::ACTION_COPY
);
$wnd->drag_dest_add_uri_targets();

$wnd->connect('drag-data-get', 'onGetDragData');
$wnd->connect('drag-data-received', 'onDragDataReceived');


function onDragDataReceived($widget, $context, $x, $y, $data, $info, $time) {
    echo "drag-data-received\r\n";
    var_dump($data->get_uris());
}
function onGetDragData($widget, $context, $selection, $info, $time) {
    echo "drag-data-get\r\n";
//    $selection->set(Gdk::atom_intern('text/variable'), 8, 'abc', 3);
    $selection->set_uris(array('file:///', 'file:///home/cweiske/a.out'));
}


$wnd->show_all();
Gtk::main();
?>

Actual result:
--------------
*** glibc detected *** corrupted double-linked list: 0x08dd5e00 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread 16384 (LWP 10903)]
0xb7bcc0b1 in kill () from /lib/libc.so.6
(gdb) bt
#0  0xb7bcc0b1 in kill () from /lib/libc.so.6
#1  0xb77631e1 in pthread_kill () from /lib/libpthread.so.0
#2  0xb776355b in raise () from /lib/libpthread.so.0
#3  0xb7bcbe44 in raise () from /lib/libc.so.6
#4  0xb7bcd30d in abort () from /lib/libc.so.6
#5  0xb7bfe5bc in __fsetlocking () from /lib/libc.so.6
#6  0xb7c08417 in mallopt () from /lib/libc.so.6
#7  0xb7c07465 in mallopt () from /lib/libc.so.6
#8  0xb7c06a91 in mallopt () from /lib/libc.so.6
#9  0xb7c05b33 in malloc () from /lib/libc.so.6
#10 0xb701f77e in cairo_matrix_invert () from /usr/lib/libcairo.so.2
#11 0x0000020c in ?? ()
#12 0x3fecfcfc in ?? ()
#13 0xb70519f4 in ?? () from /usr/lib/libcairo.so.2
#14 0xb701f61e in cairo_matrix_invert () from /usr/lib/libcairo.so.2
#15 0x08dd4e48 in ?? ()
#16 0x00000000 in ?? ()
#17 0xbffa5798 in ?? ()
#18 0xb709bdb9 in gdk_cairo_set_source_color ()
   from /usr/lib/libgdk-x11-2.0.so.0
#19 0x00fa5790 in ?? ()
#20 0x08dd5798 in ?? ()
#21 0x08dd5790 in ?? ()
---Type <return> to continue, or q <return> to quit---
#22 0xb701f31a in cairo_matrix_invert () from /usr/lib/libcairo.so.2
#23 0x08dd5798 in ?? ()
#24 0x00000000 in ?? ()
#25 0xbffa5770 in ?? ()
#26 0x00000001 in ?? ()
#27 0x00000000 in ?? ()
#28 0x00000000 in ?? ()
#29 0x00000000 in ?? ()
#30 0xb7013d8a in cairo_move_to () from /usr/lib/libcairo.so.2
#31 0x08dd5798 in ?? ()
#32 0x00000000 in ?? ()
#33 0x00000000 in ?? ()
#34 0x00000000 in ?? ()
#35 0x00000000 in ?? ()
#36 0x00000000 in ?? ()
#37 0x00000000 in ?? ()
#38 0x00000000 in ?? ()
#39 0xb70519f4 in ?? () from /usr/lib/libcairo.so.2
#40 0x08dd5790 in ?? ()
#41 0x08dcf148 in ?? ()
#42 0xb70144f0 in cairo_rectangle () from /usr/lib/libcairo.so.2
#43 0x08dd5790 in ?? ()
#44 0x00000000 in ?? ()
---Type <return> to continue, or q <return> to quit---
#45 0x00000000 in ?? ()
#46 0x00000000 in ?? ()
#47 0x00000000 in ?? ()
#48 0xb70519f4 in ?? () from /usr/lib/libcairo.so.2
#49 0x08dd5790 in ?? ()
#50 0xb701323a in cairo_create () from /usr/lib/libcairo.so.2
#51 0x00000000 in ?? ()
#52 0x40690000 in ?? ()
#53 0x00000000 in ?? ()
#54 0x40690000 in ?? ()
#55 0x08dd5790 in ?? ()
#56 0xb71090a8 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#57 0x08dd5790 in ?? ()
#58 0xb70b603e in gdk_window_get_internal_paint_info ()
   from /usr/lib/libgdk-x11-2.0.so.0
#59 0x00000000 in ?? ()


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-05 19:49 UTC] andrei@php.net
Fixed in CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC