#788 SIGSERV: 11

closed-fixed
8
2013-05-25
2004-07-12
jonathan
No

hi all,

I post this in the user list but i want to put it here too.

When I try to compile this code:

#include "pic18f452.h"

#pragma stack 0x5ff

code char at __CONFIG0H _conf0 = _OSC_HS_PLL_0H;
code char at __CONFIG1H _conf1 = _WDT_OFF_1H;
code char at __CONFIG3L _conf3 = _STVR_OFF_3L &
_LVP_OFF_3L;

unsigned char test=0 ;
void toggle1(unsigned char *data);
void main(void)
{
unsigned char *t;
toggle1(t);
}
void toggle(unsigned char d)
{
}
void toggle1(unsigned char *t)
{
toggle(*t);
}

this cause SIGVSERV: 11

I compile this code with the folowing flag:

sdcc --pomit-ivt -V -S -mpic16 -p18f452 test.c
gpasm -c test.asm -o test.o
gplink -I"D:\SDCC\lib" -I"D:\SDCC\lib\pic16" crt0i.o -o
"test.ihx" "test.o" pic18f452.lib

SDCC :
mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51
/ds400/hc08 2.4.2 (Jul 8 2004) (MINGW32)

regards
Jonathan

Discussion

  • Vangelis Rokas
    Vangelis Rokas
    2004-09-24

    Logged In: YES
    user_id=770505

    Can you confirm this bug is still existent
    in SDCC version 2.4.4 #848 ???

     
  • Vangelis Rokas
    Vangelis Rokas
    2004-09-24

    • milestone: --> 100454
    • priority: 5 --> 8
    • assigned_to: nobody --> vrokas
     
  • jonathan
    jonathan
    2004-09-28

    Logged In: YES
    user_id=717087

    have you receive my e-mail vangelis about this problem ?

     
  • jonathan
    jonathan
    2004-09-29

    Logged In: YES
    user_id=717087

    > hi Vangelis,
    >
    > if i use this command line:
    > sdcc -I"C:\Program
    > Files\SDCC\include\pic16" --pomit-ivt -V -S -mpic16 -
    p18f452 --debug-xtra
    > -debug
    > test.c
    >
    > the output is:
    >
    >
    > C:\Projet\Passerel bt lon\test avec sdcc>sdcc -I"C:\Program
    > Files\SDCC\include\pic16" --pomit-ivt -V -S -mpic16 -
    p18f452 --debug-xtra
    > -debug
    > test.c
    > Processor: 18f452
    > ralloc.c:719 symbol toggle1(r:_toggle1) is not assigned to a
    memmap
    > ralloc.c:719 symbol toggle1(r:_toggle1) is not assigned to a
    memmap
    > No registers saved on this pass
    > No registers saved on this pass
    > +
    > C:\PROGRA~1\SDCC\bin\sdcpp.exe -nostdinc -Wall -std=c99
    -DSDCC=1 -I"C:\Program
    > Files\SDCC\include\pic16" -debug -Dpic18f452 -
    DSDCC_MODEL_SMALL -DSDCC_pic16
    > -D__pic16 -I"C:\Program
    > Files\SDCC\bin\..\share\sdcc\include" -I"C:\Program
    > Files\SDCC\bin\..\share\sdcc\include\pic16" "test.c"
    >
    >
    > but if i remove the --debug-xtra -debug
    >
    > here the result:
    >
    > C:\Projet\Passerel bt lon\test avec sdcc>sdcc -I"C:\Program
    > Files\SDCC\include\pic16" --pomit-ivt -V -S -mpic16 -
    p18f452 test.c
    > Processor: 18f452
    > Caught signal 11: SIGSEGV
    > +
    > C:\PROGRA~1\SDCC\bin\sdcpp.exe -nostdinc -Wall -std=c99
    -DSDCC=1 -I"C:\Program
    > Files\SDCC\include\pic16" -Dpic18f452 -
    DSDCC_MODEL_SMALL -DSDCC_pic16 -D__pic16
    > -I"C:\Program Files\SDCC\bin\..\share\sdcc\include" -I"C:
    \Program
    > Files\SDCC\bin\..\share\sdcc\include\pic16" "test.c"
    >
    > sdcc -v:
    > SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/
    xa51/ds400/hc08
    > 2.4.4 #849 (Sep 27 2004) (MINGW32)
    >
    > I attached oll the file generated by sdcc on the 11 SIGSEGV
    error.
    >
    > regards
    >
    > Jonathan
    >
    >
    > ----- Original Message -----
    > From: "Vangelis Rokas" <vrokas@otenet.gr>
    > To: <sdcc-devel@lists.sourceforge.net>
    > Sent: Saturday, September 25, 2004 1:37 AM
    > Subject: Re: [sdcc-devel] [ sdcc-Bugs-989576 ] SIGSERV:
    11
    >
    >
    >>
    >> On Fri, 24 Sep 2004, Jonathan Dumaresq wrote:
    >>
    >>> SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/
    TININative/xa51/ds400/hc08
    >>> 2.4.4 #847 (Sep 23 2004) (MINGW32)
    >>>
    >>>
    >>> sdcc --pomit-ivt -V -S -mpic16 -p18f452 test.c
    >>>
    >>> I test it with this snapshot and i get the same result :(
    >>>
    >>> i attachted the new file

     
  • jonathan
    jonathan
    2004-10-06

    Logged In: YES
    user_id=717087

    ok .. this is very weird.

    when i write this in cygwin.

    dumarjo@JONATHAN-PII ~/test
    $ sdcc --pomit-ivt -V -S -mpic16 -p18f452 test.c
    Processor: 18f452
    +
    C:\cygwin\usr\local\bin\sdcpp -nostdinc -Wall -std=c99 -
    DSDCC=1 -Dpic18f452
    -D
    SDCC_MODEL_SMALL -DSDCC_pic16 -D__pic16 -I"C:
    \cygwin\usr\local\bin\..\share\sdcc
    \include" -I"C:\cygwin\usr\local\bin\..
    \share\sdcc\include\pic16" "test.c"
    Caught signal 11: SIGSEGV

    but if i do it in gdb:

    dumarjo@JONATHAN-PII ~/test
    $ gdb sdcc
    GNU gdb 2003-09-20-cvs (cygwin-special)
    Copyright 2003 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public
    License, and you are
    welcome to change it and/or distribute copies of it under
    certain
    conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show
    warranty" for details.
    This GDB was configured as "i686-pc-cygwin"...(no debugging
    symbols
    found)...
    (gdb) set args --pomit-ivt -V -S -mpic16 -p18f452 test.c
    (gdb) run
    Starting program: /usr/local/bin/sdcc.exe --pomit-ivt -V -S -
    mpic16 -p18f452
    test.c
    Processor: 18f452
    +
    C:\cygwin\usr\local\bin\sdcpp -nostdinc -Wall -std=c99 -
    DSDCC=1 -Dpic18f452
    -D
    SDCC_MODEL_SMALL -DSDCC_pic16 -D__pic16 -I"C:
    \cygwin\usr\local\bin\..\share\sdcc
    \include" -I"C:\cygwin\usr\local\bin\..
    \share\sdcc\include\pic16" "test.c"

    Program exited normally.
    (gdb) bt
    No stack.
    (gdb) quit

    regards

    Jonathan

     
  • Raphael Neider
    Raphael Neider
    2005-01-24

    Logged In: YES
    user_id=1115835

    This should be fixed in #939 along with the other MinGW
    malloc fixes.
    (One has to adapt CONFIGx[HL] to CONFIG(x+1)[HL] on all
    occurences though...)

     
  • Raphael Neider
    Raphael Neider
    2005-01-24

    • milestone: 100454 --> fixed
    • status: open --> closed-fixed
     
  • jonathan
    jonathan
    2005-01-26

    Logged In: YES
    user_id=717087

    all is now fix. I run perfectly with the new 2.4.8 version

    Thanx for your hard work..

    Jonathan