Bug 98590 - [FIX] ports rxvt-devel on amd64 crashes inside rxvt_selection_send()
Summary: [FIX] ports rxvt-devel on amd64 crashes inside rxvt_selection_send()
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-06 11:40 UTC by kasahara
Modified: 2008-01-04 16:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kasahara 2006-06-06 11:40:28 UTC
I experienced repeatable crashes of x11/rxvt-devel with sysutils/synergy
on amd64, saying "rxvt: XError: Request 18 . 0, Error: 2".  It always
happened when a selection was active on the rxvt and the mouse pointer
moved off from the X display to the synergy client display.

Here is the cause:  (screen.c line 3549~ inside rxvt_selection_send())

    } else if (rq->target == r->h->xa[XA_TIMESTAMP] && r->selection.text) {
        XChangeProperty(r->Xdisplay, rq->requestor, rq->property, XA_INTEGER,
                        (8 * sizeof(Time)), PropModeReplace,
                        (unsigned char *)&r->h->selection_time, 1);

On amd64, sizeof(Time) is 8, but 64 is invalid for XChangeProperty(),
and it generates BadValue error.  It should be 32 instead, which means "long".

Fix: 

Change (8 * sizeof(Time)) to 32 (more appropriate macro available?).
How-To-Repeat: Configure a synergy client and a synergy server.  Run rxvt-devel on the
server side.  Select some text on the rxvt by a mouse.  Move the pointer
over to the client side.

(I couldn't find more convenient way to invoke rxvt_selection_send)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-06-06 12:28:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->lioux

Over to maintainer
Comment 2 Mario Sergio Fujikawa Ferreira freebsd_committer freebsd_triage 2007-12-25 20:00:52 UTC
Responsible Changed
From-To: lioux->freebsd-ports-bugs

I am no longer the maintainer
Comment 3 Pav Lucistnik freebsd_committer freebsd_triage 2008-01-04 13:36:02 UTC
State Changed
From-To: open->feedback

Can you provide a patch? 


Comment 4 Pav Lucistnik freebsd_committer freebsd_triage 2008-01-04 13:36:02 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Track
Comment 5 Pav Lucistnik freebsd_committer freebsd_triage 2008-01-04 15:53:07 UTC
State Changed
From-To: feedback->closed

Committed, thanks!
Comment 6 dfilter service freebsd_committer freebsd_triage 2008-01-04 15:53:31 UTC
pav         2008-01-04 15:53:27 UTC

  FreeBSD ports repository

  Modified files:
    x11/rxvt-devel       Makefile 
  Added files:
    x11/rxvt-devel/files patch-src-screen.c 
  Log:
  - Fix a runtime crash on amd64
  
  PR:             ports/98590
  Submitted by:   Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp>
  
  Revision  Changes    Path
  1.84      +1 -1      ports/x11/rxvt-devel/Makefile
  1.1       +11 -0     ports/x11/rxvt-devel/files/patch-src-screen.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"