public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Nunzio Raciti <nunzio.raciti@gmail.com>
To: insight@sourceware.org
Subject: Insight problem when environment variable DISPLAY=xxx.xxx.xxx.xxx:0.
Date: Wed, 25 May 2011 08:04:00 -0000	[thread overview]
Message-ID: <BANLkTi=_+cq+SZZZOedSFFtbUEhKa35T5Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

Hi All,

I discovered a bug on Insight, probably exposed by new version of libc,
when the environment variable "DISPLAY" is set with a value like
"xxx.xxx.xxx.xxx:0."

The problem occurs exiting from the GUI without open other windows:
1- $ insight
2- check that there aren't other open windows (eg. console, stack....)
3- exit from the GUI (eg. file->exit)
4- if you are using glibc => 2.3.4

*** glibc detected *** double free or corruption (!prev): 0xXXXXXXX ***
Aborted

Attached is my proposal of patch.

Ciao,
Nunzio

[-- Attachment #2: insight_var_DISPLAY.patch --]
[-- Type: text/x-diff, Size: 641 bytes --]

diff U3 C:/Temp/insight-weekly-CVS-7.0.50-20091130/src/tk/generic/tkWindow.c C:/Temp/insight-patched/src/tk/generic/tkWindow.c
--- C:/Temp/insight-weekly-CVS-7.0.50-20091130/src/tk/generic/tkWindow.c	Tue Jan 21 22:24:46 2003
+++ C:/Temp/insight-patched/src/tk/generic/tkWindow.c	Wed May 25 09:44:50 2011
@@ -450,6 +450,11 @@
     if ((*p == '.') && (p[1] != '\0')) {
 	length = p - screenName;
 	screenId = strtoul(p+1, (char **) NULL, 10);
+    } else
+          /* Cover the "xxx.xxx.xxx.xxx:0." case */
+          if ((*p == '.') && (p[1] == '\0')) {
+	      length = p - screenName;
+	      screenId = 0;
     }
 
     /*

                 reply	other threads:[~2011-05-25  8:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=_+cq+SZZZOedSFFtbUEhKa35T5Q@mail.gmail.com' \
    --to=nunzio.raciti@gmail.com \
    --cc=insight@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).