[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Source code editor



On 21/04/2008, Johann Spies <jspies@sun.ac.za> wrote:
> On Fri, Apr 18, 2008 at 12:12:40PM +0200, Lars Bjerregaard wrote:
>  > Jordi Gutiérrez Hermoso wrote:
>  >> On 16/04/2008, Tero Mäntyvaara <termant@gmail.com> wrote:
>  >>>  I installed motor in my AMD64 Etch system and after I execute it I get
>  >>> "Segmentation fault"... :-/
>  >>
>  >> Whoa, etch? You got that on etch? How the hell did such an RC bug get
>  >> into etch? First time I hear about it.
>
>
> I also get a 'Segmentation fault' on a 64-bit system.

Me too, it needs (at least) the following patch:

diff -u -r motor-3.4.0/src/ui/ncurses/ncursesui.cc
motor-3.4.0-patch/src/ui/ncurses/ncursesui.cc
--- motor-3.4.0/src/ui/ncurses/ncursesui.cc     2008-04-21
10:42:24.000000000 +0200
+++ motor-3.4.0-patch/src/ui/ncurses/ncursesui.cc       2008-04-21
10:32:51.000000000 +0200
@@ -338,7 +338,7 @@

     if(amode == selectorcreate) {
        db.setbar(new horizontalbar(getcolor(cp_menu), getcolor(cp_menusel),
-           _("Create/Import.."), _("Add"), _("Remove"), _("Open"), 0));
+           _("Create/Import.."), _("Add"), _("Remove"), _("Open"), (char *)0));

        db.addkey(KEY_IC, 1);
        db.addkey(KEY_DC, 2);

On AMD64 bit, int is 32 bit, while the pointers are 64 bits. So when
it pushes the int(0) as last argument on the stack for
horizontalbar(nc,sc, ...), it only pushes 4 bytes worth of 0's, in
stead of 8.
Problem is, I see a lot of functions using "..." as argument, and
cannot easily find where they are used to make sure there are no other
instances of this.

At least with the patch above it starts on my AMD 64 bit system.
I'll file a bug for it on motor.

Reply to: