#862 SIGSEGV when using indirect calls

closed-fixed
5
2013-05-25
2005-01-14
No

1)

-----------------------------------------------------
void test_func(unsigned char c)
{
}

void caller_func(void)
{
void (*func_ptr)(unsigned char);

func_ptr = &test_func;
func_ptr(0xab);
}
-----------------------------------------------------

2)

sdcc -S -V -mpic16 -p18F452 main.c

3)

SDCC :
mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08
2.4.7 #926 (Jan 14 2005) (MINGW32)

NOTE: this code crashes only with the windows binary of
sdcc, it passes with
SDCC :
mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc082.4.7
#926 (Jan 14 2005) (UNIX)

4)

Processor: 18F452
+ C:\PROGRA~1\sdcc\bin\sdcpp.exe -nostdinc -Wall
-std=c99 -DSDCC=1 -Dpic18f452 -DSTACK_MODEL_SMALL
-DSDCC_MODEL_SMALL -DSDCC_pic16 -D__pic16
-I"C:\Programme\sdcc\bin\..\include\pic16" "main.c"
main.c:3: warning 85: in function test_func
unreferenced function argument : 'c'

Caught signal 11: SIGSEGV

5)

Thorsten.Klose@gmx.de

Discussion

  • Thorsten Klose

    Thorsten Klose - 2005-01-14
    • labels: --> pic16 target
     
  • Vangelis Rokas

    Vangelis Rokas - 2005-01-23

    Logged In: YES
    user_id=770505

    Works for me with latest SDCC/pic16 snapshot (v.2.4.8 #396)

    Please try it out...

    Vangelis

     
  • Raphael Neider

    Raphael Neider - 2005-01-24
    • status: open --> closed
     
  • Raphael Neider

    Raphael Neider - 2005-01-24
    • milestone: --> fixed
    • assigned_to: nobody --> tecodev
    • status: closed --> closed-fixed
     
  • Raphael Neider

    Raphael Neider - 2005-01-24

    Logged In: YES
    user_id=1115835

    fixed in #939

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks