Public bug reported:
1) Ubuntu release:
emil@Lucious:~$ lsb_release -rd
Description: Ubuntu 10.04.4 LTS
Release: 10.04
2) Package version:
emil@Lucious:~$ apt-cache policy xgraph
xgraph:
Installed: 12.1-12
Candidate: 12.1-12
Version table:
*** 12.1-12 0
500 http://il.archive.ubuntu.com/ubuntu/ lucid/universe Packages
100 /var/lib/dpkg/status
3) What I expected to happen: After plotting some data with a command line like:
emil@Lucious:~$ xgraph << EOF
> 1 2
> 3 4
> EOF
and pressing the Hdcpy button I expect a dialog to pop which allows me
to set various options for printing the graph
4) What happened instead: xgraph crashes with a segmentation fault.
MORE INFO:
This happens only on 64 bit builds; on 32 bit builds the problem does not
occur. I have researched the problem and the reason why this happens is that an
unadorned 0 is passed as a variadic argument to xtb_hort() and xtb_vert(). The
compiler has no way to know that those functions expect a NULL pointer instead
and therefore it won't convert the 0 to a NULL pointer. Since on the 64 bits
AMD platform ints and pointers are of different sizes the functions do not
properly sense the end of the variadic parameter list which ultimately leads to
the crash.
IMO the fix is fairly trivial. Attached is a patch.
** Affects: xgraph (Ubuntu)
Importance: Undecided
Status: New
** Tags: hdcpy segfault xgraph
** Patch added: "The attached patch fixes this bug"
https://bugs.launchpad.net/bugs/1175701/+attachment/3662882/+files/hdcpy_segfault_fix.diff
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1175701
Title:
xgraph segfaults when pressing the Hdcpy button
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xgraph/+bug/1175701/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs