#16 Segfault problem on Linux

closed
None
5
2002-06-10
2001-07-13
No

I have a problem with segfault on Linux. I have tested both 2.9.6 and 2.9.7-pre0.

Configuration, compilation and installation goes without any problems but when I start joe:
Processing '/etc/joerc'...Segmentation fault

I have traced down the problem to termcap.c and it seems that the segfault occurs in the tcompile function, at the call to texec (I am in the source just before the call but I never reach texec body).

I _think_ the problem can be related to my compiler - GCC 3.0. Is there anyone out there who has compiled joe using GCC-3? I have not been able to compile joe at my computer with gcc 2.95.3, but I have done that at a computer running Slackware 7.1 and it work excellent (using Joe 2.9.6). I have also tested Joe 2.9.7-pre0 on a computer running Redhat 6.2 (egcs-2.91.66) and it works on both computers.

BTW. During digging through the code I noticed that most functions (in the header file) does not explicitly declare what parameters they expect. This could be a problem and it is something that I think we should fix asap. There are also lot of warnings during compilation (if you use -Wall). I would be glad to help with these [simple] matters.

Daniel Andersson
joe-editor (at) addelei.nu

Discussion

  • Vitezslav Samel

    Vitezslav Samel - 2001-07-16

    Logged In: YES
    user_id=208150

    Hi!

    I'm investigating it. First help is to remove
    -fomit-frame-pointer or decrease optimization level
    {I tried -O and it worked} in the Makefile.

    Cheers,
    Vita

     
  • Vitezslav Samel

    Vitezslav Samel - 2001-07-18

    Logged In: YES
    user_id=208150

    Hi!

    Yesterday I worked on this and tried following options to
    gcc-3.0 {tried also gcc-20010702 snapshot with same
    results}:

    Compiling with default options {-O2 -fsigned-char
    -fomit-frame-pointer -pipe} gives segafult in texec{}.
    Compiling with:
    -O1 -fsigned-char -fomit-frame-pointer -pipe
    or
    -O2 -fsigned-char -pipe
    or
    -O2 -fsigned-char -fomit-frame-pointer -pipe -fstack-check

    compiles and runs OK {all this on i686 arch}. I was looking
    at assembly output of gcc-3.0 and it seems to me like badly
    generated code for stack variables --> all this is gcc-3
    bug.

    Folks, can you try compiling with gcc-3 on other archs to
    see if this is only IA-32 problem?

    Cheers,
    Vita

     
  • Vitezslav Samel

    Vitezslav Samel - 2001-07-18

    Logged In: YES
    user_id=208150

    Hi!

    Yesterday I worked on this and tried following options to
    gcc-3.0 {tried also gcc-20010702 snapshot with same
    results}:

    Compiling with default options {-O2 -fsigned-char
    -fomit-frame-pointer -pipe} gives segafult in texec{}.
    Compiling with:
    -O1 -fsigned-char -fomit-frame-pointer -pipe
    or
    -O2 -fsigned-char -pipe
    or
    -O2 -fsigned-char -fomit-frame-pointer -pipe -fstack-check

    compiles and runs OK {all this on i686 arch}. I was looking
    at assembly output of gcc-3.0 and it seems to me like badly
    generated code for stack variables --> all this is gcc-3
    bug.

    Folks, can you try compiling with gcc-3 on other archs to
    see if this is only IA-32 problem?

    Cheers,
    Vita

     
  • Vitezslav Samel

    Vitezslav Samel - 2001-10-08
    • assigned_to: nobody --> vsamel
     
  • Vitezslav Samel

    Vitezslav Samel - 2002-01-11

    Logged In: YES
    user_id=208150

    I checked gcc-3.0.3 and it worked. So, please , upgrade to
    gcc-3.0.3

     
  • Vitezslav Samel

    Vitezslav Samel - 2002-06-10
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks