#2129 [PIC14] Token __pdata causes SIGSEGV.

closed-fixed
5
2013-05-25
2013-01-13
No

source.c:
int __pdata val = 0x34;

void main (void)
{
val = 0x1234;
}

command:
sdcc -mpic14 -p16f877a -c source.c

version:
sdcc r8385

output:
None (SIGSEGV).

Reported by feqin fan on "[sdcc-devel] port PIC14--keyword __pdata will cause SIGSEGV." (2013-01-10).

Discussion

  • Raphael Neider

    Raphael Neider - 2013-01-13
    • milestone: --> fixed
    • status: open --> closed-fixed
     
  • Raphael Neider

    Raphael Neider - 2013-01-13

    Fixed in r8386.

     
  • feqin fan

    feqin fan - 2013-01-14

    You are so quick.
    In last weekend I have found the question is come from when the PORT pic_port being initialised the pic_port.mem.pdata_name's value is NULL. the function defaultOClass() will return pdata which is NULL, allocIntoSeg() will use this NULL in succession, So SIGSEGV.
    I think the most simply method is change the SDCC.lex when finding the pdata replace it with data. But this way will cause the specific port's info sneak into the shared frontend.
    Now, the pdata is deleted, It's really need courage.
    :-)

     

Log in to post a comment.