[mythtv-commits] Ticket #3401: mythtv-setup crashes when using remote X display (via ssh)
MythTV
mythtv at cvs.mythtv.org
Mon Jun 25 17:47:43 UTC 2007
#3401: mythtv-setup crashes when using remote X display (via ssh)
-----------------------+----------------------------------------------------
Reporter: anonymous | Owner: danielk
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: head
Severity: medium | Resolution:
Mlocked: 0 |
-----------------------+----------------------------------------------------
Comment(by eloy at chapus.net):
Replying to [comment:5 anonymous]:
> eloy: You're completely wrong. XRRQueryExtension() can and should be
called with two NULL pointers. You can first start by reading the man
page, http://www.die.net/doc/linux/man/man3/xrrqueryextension.3.html
>
> Then read the code. Those are called "out variables" or callback
variables. If you don't care about the data coming to you, you set them
equal to NULL and all is well.
anonymous: if you set to NULL the pointers to your "out variables" in the
specific case of XRRQueryExtension() then nothing is well.
I read the code before claiming that the patch is bogus. It seems like you
haven't read it, or if you read it you didn't understand the problem, so
how about we read the code together? See:
http://csourcesearch.net/package/kdrive/4.3.0/xc/lib/Xrandr/Xrandr.c
XRRQueryExtension(Display *dpy, int *event_basep, int *error_basep) is
defined at line 339.
If the function parameters event_basep and error_basep are NULL then lines
344 and 345 will be writing something to address 0x00000000. I am sure you
know that doing this is bad, and will cause a crash.
Trust me on this one - the patch is bogus; you can't pass NULL in the two
pointers that XRRQueryExtension() receives.
This patch was applied to the MythTV Debian packages and had to be backed
out because the backend was crashing as soon as it started. Debugging
showed that it was crashing because of the problem that I describe above.
The correct way to call XRRQueryExtension() is to pass real, valid
pointers, not NULL pointers.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/3401#comment:6>
MythTV <http://svn.mythtv.org/trac>
MythTV
More information about the mythtv-commits
mailing list