Forum: Ruby-Gnome 2 Crash when handling exception coming from an signal handler

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
unknown (Guest)
on 2006-05-16 17:08
(Received via mailing list)

  I got some strange crashes when handling an exception coming from a
  handler. I was able to make a contrived example that triggers it
  (on *some* of my systems) :(

  valgrind shows the following:
    ==10757== Invalid read of size 8
    ==10757==    at 0x5760FA0: g_signal_emit_valist (in
    ==10757==    by 0x5761382: g_signal_emit (in
    ==10757==    by 0x791E41B: gtk_adjustment_value_changed (in
    ==10757==    by 0x7729936: (within
    ==10757==    by 0x4B530EB: (within /usr/lib/
    ==10757==    by 0x4B53540: (within /usr/lib/
    ==10757==    by 0x4B4F1F5: (within /usr/lib/
    ==10757==    by 0x4B51106: (within /usr/lib/
    ==10757==    by 0x4B5D5BA: (within /usr/lib/
    ==10757==    by 0x4B5D604: ruby_exec (in
    ==10757==    by 0x4B5F8A1: ruby_run (in
    ==10757==    by 0x4007B8: main (in /usr/bin/ruby1.8)
    ==10757==  Address 0x7FEFFD438 is not stack'd, malloc'd or
(recently) free'd

  I digged somewhat deeper and it appears that the g_restart_emissions
  glib2's gsignal.c points to some memory that's no longer on the
  stack :(.. Probably because of some strange interaction between glib's
  handling and ruby jumping to another (exception handling) context....

Masao M. (Guest)
on 2006-05-16 19:07
(Received via mailing list)

Hmm, it doesn't occur on my system.

% ruby test.rb
test.rb:10: undefined method `bloep!' for main:Object (NoMethodError)
       from test.rb:20
% ruby -v
ruby 1.8.4 (2005-12-24) [i686-linux]

Ruby-GNOME2 is latest CVS version,
with your rbgclosure patch.

Tell me the detail of your system what this problem occures.

If it's on x86_64 system only,
I can't test it ... it may be a problem with incorrect casting anywhere.

On Fri, 12 May 2006 12:41:18 +0200
removed_email_address@domain.invalid (Sjoerd S.) wrote:

>     ==10757==    by 0x5761382: g_signal_emit (in
>     ==10757==    by 0x4B5F8A1: ruby_run (in /usr/lib/
> 	"It's today!" said Piglet.
> 	"My favorite day," said Pooh.

.:% Masao M.<removed_email_address@domain.invalid>

Using Tomcat but need to do more? Need to support web services,
Get stuff done quickly with pre-integrated technology to make your job
Download IBM WebSphere Application Server v.1.0.1 based on Apache
This topic is locked and can not be replied to.