Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1541 Inverting and casting bit argument to char causes SIGSEGV

closed-fixed
Maarten Brock
5
2013-05-25
2009-06-12
Johan Hovold
No

Inverting and casting a bit argument to a char causes SDCC to segfault.

Note that casting to unsigned char (or signed int) works fine.

void f(void)
{
extern void g(char);
extern __bit b;

g(!b); /* Causes SDCC 2.9.0 to segfault.. */
}

$ sdcc -mmcs51 --model-small -c -o bit_bug.rel bit_bug.c
Caught signal 11: SIGSEGV

SDCC : mcs51 2.9.0 #5416 (May 7 2009) (UNIX)

Discussion

  • Johan Hovold
    Johan Hovold
    2009-06-12

    Example code to trigger SIGSEGV

     
    Attachments
  • Maarten Brock
    Maarten Brock
    2009-08-14

    • labels: 101552 --> mcs51(8051) target
    • assigned_to: nobody --> maartenbrock
     
  • Maarten Brock
    Maarten Brock
    2009-08-29

    Fixed with patch 2837100 in SDCC 2.9.2 #5508.

     
  • Maarten Brock
    Maarten Brock
    2009-08-29

    • milestone: --> fixed
    • status: open --> closed-fixed