When using the Edit menu to change the arrows of a line (or some other properties I did not investigate), Xfig segfaults.
This is probably due to integer-to-pointer-to-integer conversions in the callback arguments in XtAddCallback &co.
Steps to Reproduce:
1. Lounch Xfig
2. Draw a line
3. Click on the Edit tool to modify the line
4. Select "Forward Arrow"
In gdb, the menu of possible arrows appears and then it segfaults, but I have no backtrace at the moment.
Have a "drop down menu" that shows different arrows, and select them.
This is probably caused by arguments passed as XtPointers (=void *), which are in fact integers, and in amd64 architectures this is not compatible.
Created attachment 309603 [details, diff]
Intermediate conversions to intptr_t before casting to pointers
I made this patch with a lot of "(intptr_t)", trying to get saner conversions. As it turned out, I also needed to get a XAW_INTERNATIONALIZATION defined for e_edit.c to properly compile, so I put it altogether so that people with up to date xaw3d can directly test.
It corrected the bug on the edit menu for me, but of course this kind of conversion could have even subtler side-effects...
+ 04 Mar 2013; Christoph Junghans <email@example.com>
+ +files/xfig-3.2.5b-darwin.patch, +files/xfig-3.2.5b-edit-menu.patch,
+ +files/xfig-3.2.5b-solaris.patch, +xfig-3.2.5b-r3.ebuild:
+ fixed bugs #412753 and #405475, added prefix support
Guys, although but is fixed here is a heads up as I'm going to drop this patch. Reasons are:
1. I don't understand why this change of types even needed. After reading these threads
I understand that
"intptr_t is really for the rare occasions that you have to interpret pointers as integers (which they really aren't). Don't that if you mustn't."
2. I failed to reproduce bug and I'm not sure how this patch fixes it.
So in xfig-3.2.5c I've dropped it. As I read changelog other crashes where fixed there, so, please, could you try xfig-3.2.5c and report if this problem still exits?