Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

SIGSEGV on pic14 port Bug Fix

2004-10-11
2013-03-12
  • Paul Ashmore
    Paul Ashmore
    2004-10-11

    I'm looking for help. I found a problem in the PIC14 port while accessing arrays or structs multiple times.
    I've fixed the bug...I'll paste the code in later.

    The problem is that an Immediate data (legacy 8051) pcode structure is being copied and derferenced by the popCopyReg function (in pcode.c line 2797 in SDCC 2.4.4 checked out on 10/9/2004).

    The part of the struct being dereferenced is the regs part of the pCodeOpReg structure, which was never setup in the case of a PO_IMMEDIATE, but the literal part was.

    ---------------------------
    The old code is:
                    pcor->r = pc->r;
                    pcor->rIdx = pc->rIdx;
                    pcor->r->wasUsed=1;

    The new code is:
            if (pcor->pcop.type == PO_IMMEDIATE){
                    PCOL(pcor)->lit = PCOL(pc)->lit;
            } else {
                    pcor->r = pc->r;
                    pcor->rIdx = pc->rIdx;
                    pcor->r->wasUsed=1;
            }

    ---------------------------

    I've made this change to my private code (based on SDCC 2.4.4 checked out on 10/9/2004)

    So why am I asking for help ? I have no idea how to checkin a bug fix in this system, or where it goes or what access rights I need. Where do I put comments like this ?

    What verification of bug fixes happen before checking in ?

    Any docs I can read related to this. I guess I'm just new to sourceforge procedures.

    Paul
    sourceforge@ashmoreisland.com