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 337239 - immediate segfaults on x86_64
immediate segfaults on x86_64
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: atkbridge
1.7.x
Other Linux
: High major
: ---
Assigned To: bill.haneman
bill.haneman
: 335719 386700 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-04-04 18:24 UTC by Matthias Clasen
Modified: 2007-01-04 10:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.25 KB, patch)
2006-04-04 19:52 UTC, Matthias Clasen
none Details | Review
Fix the corba memory management (1.09 KB, patch)
2006-07-28 20:21 UTC, Alexander Larsson
committed Details | Review
stacktrace of crash related to this, I believe (3.81 KB, text/plain)
2006-12-27 23:37 UTC, Christian Kirbach
  Details

Description Matthias Clasen 2006-04-04 18:24:05 UTC
I still see this problem. 


  if (e.any_data._release) CORBA_free (&e.any_data._value);

at the end of spi_atk_emit_eventv segfaults very early in every
single application.
Comment 1 Matthias Clasen 2006-04-04 19:51:42 UTC
Ok, I finally tracked this down to an extraneous & in 

if (e.any_data._release) CORBA_free (&e.any_data._value);

The attached patch fixes a few other compiler warnings at the same time.
Comment 2 Matthias Clasen 2006-04-04 19:52:09 UTC
Created attachment 62762 [details] [review]
patch
Comment 3 bill.haneman 2006-04-04 22:41:42 UTC
Comment on attachment 62762 [details] [review]
patch

please commit the fix to the coRBA_free param.  Not sure about the rest, since the casts seem necessary for some compilers (I put them in to silence a compiler in the first place)
Comment 4 Matthias Clasen 2006-04-05 00:27:42 UTC
regarding the casts, gcc on x86_64 complains that
you cast a pointer to an integer of differnt size.
and it is correct...
Comment 5 Matthias Clasen 2006-04-05 15:44:54 UTC
2006-04-05  Matthias Clasen  <mclasen@redhat.com>

        * atk-bridge/bridge.c (spi_atk_emit_eventv): Fix a
        memory-management error that caused crashes on x86_64.
        (#337239)

Comment 6 Christian Persch 2006-04-06 11:29:11 UTC
billh: My patch in bug 333883 contains the same casts fixes and you approved it already...
Comment 7 Matthias Clasen 2006-04-10 12:50:21 UTC
hmm, the &-removal did make the segfaults go away on x86_64, but now it segfaults on i386. I am pretty much out of ideas and time to dig into this now. My current
assumption is that maybe some of the struct copying and stack-allocation of 
anys forgets to set up/copy the mem-prefix which CORBA_free needs.
Comment 8 bill.haneman 2006-06-14 15:26:12 UTC
*** Bug 335719 has been marked as a duplicate of this bug. ***
Comment 9 Alexander Larsson 2006-07-28 20:20:27 UTC
Matthias analysis is right. The & should go away, but you also need to allocate the object in the any in a way so that the memory info prefix is there. Attaching patch.
Comment 10 Alexander Larsson 2006-07-28 20:21:28 UTC
Created attachment 69848 [details] [review]
Fix the corba memory management
Comment 11 bill.haneman 2006-07-31 22:15:44 UTC
aha!

Alex, thanks a lot for the fix.  It makes a lot of sense to me now, but I stared a long time without seeing it, before.

I wanted to apply the fix to the gnome-2-14 branch of cvs for tonight's release, but I see that I've messed up and didn't increment the AT-SPI minor revision when I broke back-compat on HEAD (i.e. 2.15 tarballs have already been released in the at-spi-1.7.X series).

Your patch should be applied by any distros that are still working from stable.

I'll apply to HEAD ASAP.


Comment 12 bill.haneman 2006-07-31 22:22:52 UTC
Hey - while I can't (or rather, don't know how to...) make a 2.14 release tarball for AT-SPI, I can at least commit your patch to the 2-14 branch.  That way distros can pull from gnome-2.14 branch CVS and get something better than the at-spi-1.7.6 release, which was the last one in the stable 2.14 series.

fortunately 2.16 is nearly out...

One little nit: I am not crazy about using ORBit API here, isn't there some bog-standard CORBA way of doing the same thing?  Just wondering...
Comment 13 Daniel Holbach 2006-08-01 11:31:30 UTC
I'm sad to say I don't think the patch is safe yet. 

As I said in bug 331924 comment 8, Ubuntu patched out parts of the patch there. Today I tried to drop our reversion patch and use the fix from comment 10, but this is the crash I get from 'gnome-at-properties':


Backtrace was generated from '/usr/bin/gnome-at-properties'

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1223510336 (LWP 18181)]
0xffffe410 in __kernel_vsyscall ()

Thread 1 (Thread -1223510336 (LWP 18181))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 libgnomeui_segv_handle
    at gnome-ui-init.c line 820
  • #3 <signal handler called>
  • #4 giop_send_buffer_append_string
    at giop-send-buffer.c line 515
  • #5 ORBit_marshal_value
    at corba-any.c line 208
  • #6 ORBit_marshal_value
    at corba-any.c line 166
  • #7 ORBit_marshal_any
    at corba-any.c line 374
  • #8 ORBit_marshal_value
    at corba-any.c line 139
  • #9 ORBit_marshal_value
    at corba-any.c line 166
  • #10 orbit_small_marshal
    at orbit-small.c line 353
  • #11 ORBit_small_invoke_stub
    at orbit-small.c line 645
  • #12 ORBit_small_invoke_stub_n
    at orbit-small.c line 575
  • #13 ORBit_c_stub_invoke
    at poa.c line 2644
  • #14 Accessibility_EventListener_notifyEvent
    at Accessibility-stubs.c line 321
  • #15 gnome_accessibility_module_shutdown
    from /usr/lib/gtk-2.0/modules/libatk-bridge.so
  • #16 gnome_accessibility_module_shutdown
    from /usr/lib/gtk-2.0/modules/libatk-bridge.so
  • #17 gtk_module_init
    from /usr/lib/gtk-2.0/modules/libatk-bridge.so
  • #18 exit
    from /lib/tls/i686/cmov/libc.so.6
  • #19 __libc_start_main
    from /lib/tls/i686/cmov/libc.so.6
  • #20 _start
  • #0 __kernel_vsyscall

Comment 14 Li Yuan 2006-12-07 07:04:06 UTC
I guess the patch is not fix Matthias' crash? Because spi_atk_emit_eventv will call spi_atk_bridge_init_nil instead of spi_init_any_object. Is there something wrong in spi_atk_bridge_init_nil too? I think the bug is relative to http://bugzilla.gnome.org/show_bug.cgi?id=352444
Comment 15 Li Yuan 2006-12-12 02:37:59 UTC
Hi Alex,

After this patch, there is still crash, you can take a look at http://bugzilla.gnome.org/show_bug.cgi?id=352444
I think what spi_atk_emit_eventv calls is spi_init_any_nil. So can you find any problem of creating and freeing corba object in spi_atk_emit_eventv? 
Seems it not crashes every time when spi_init_any_nil is called in spi_atk_emit_eventv. I am very confused.

Thank you in advance.
Comment 16 palfrey 2006-12-17 18:08:17 UTC
*** Bug 386700 has been marked as a duplicate of this bug. ***
Comment 17 Christian Kirbach 2006-12-27 23:37:10 UTC
Created attachment 78964 [details]
stacktrace of crash related to this, I believe

crasher with Gnome 2.17cvs

perhaps this is of use
Comment 18 Christian Kirbach 2006-12-27 23:38:58 UTC
reopening since we still have the problem
Comment 19 Christian Kirbach 2006-12-27 23:41:07 UTC
steps to reproduce (on an i686 system):

open gnome-power-manager preferences from the settings menu and close them
Comment 20 Christian Kirbach 2006-12-28 00:21:17 UTC
matthia's patch has already been commited, but we see a crash on i386 now, or at least I do
Comment 21 Frederic Crozat 2006-12-29 09:20:14 UTC
Christian, I think your crash has been fixed on CVS, see bug #364839.
Comment 22 Christian Kirbach 2006-12-29 14:43:02 UTC
thank you for pointing that out, Frederic
Comment 23 bill.haneman 2007-01-02 11:19:55 UTC
Can we close this bug now?  (I think the answer is 'yes')
Comment 24 Christian Kirbach 2007-01-04 10:49:49 UTC
Yes, closing the report.