#408 Crash when variable never written

closed
None
5
2013-05-25
2002-10-31
No

This report likely duplicates a previous entry submitted
without logging in.

// This program crashes with sdcc.exe - Application Error
// The instruction at "0x00429b03" referenced
memory at "0x00000006".
// The memory could not be "read".

// The problem occurs on Windows 2000 running SDCC
version:
// SDCC : mcs51 2.3.1-pj3 (Jan 20 2002)
(MINGW)

// The command line was:
// c:\sdcc\bin\sdcc.exe foo.c

Discussion

  • Michael Newman

    Michael Newman - 2002-10-31

    Program that crashes

     
  • Johan Knol

    Johan Knol - 2003-01-27

    Logged In: YES
    user_id=63512

    Can you confirm this still exists in lates cvs?

     
  • Michael Newman

    Michael Newman - 2003-01-27

    Logged In: YES
    user_id=639857

    I'm a lightweight in the use of CVS to build a windows
    executable. The built image I ran appears to be the latest
    version, built by Paul Stoffregen of www.pjrc.com. It reports
    itself as 2.3.1, while the CVS version looks like 2.3.0.

    I'll be glad to test anything else, just send a .EXE to
    mnewman@dragonnorth.com.

     
  • Bernhard Held

    Bernhard Held - 2003-01-27

    Logged In: YES
    user_id=203539

    Today's MINGW32 snapshot on Win2000:
    >foo.c:33: warning: conditional flow changed by
    optimizer 'foo.c(29)':so said EVELYN the modified DOG
    >foo.c:33: warning: unreachable code foo.c(29)

     
  • Michael Newman

    Michael Newman - 2003-01-27

    Logged In: YES
    user_id=639857

    I copied the latest windows version from:
    http://sdcc.sourceforge.net/snap.php it was called sdcc-
    snapshot-i586-mingw32msvc-20030127.zip

    This version exhibits the same bug, it crashes and reports:
    The instruction at "0x00f2a5bb" referenced memory
    at "0x00000006". The memory could not be "read".

    The version line reported by SDCC is: SDCC :
    mcs51/gbz80/z80/avr/ds390/pic14/TININative/xa51 2.3.3 (Jan
    27 2003) (MINGW32)

    The creation date is Sunday, January 20, 2002, 1:12:06 PM
    which seems a bit strange. This copy of SDCC is much larger
    than my previous copy: 0.97 MB (1,024,512 bytes) vs 386 KB
    (395,264 bytes)

     
  • Bernhard Held

    Bernhard Held - 2003-01-27

    Logged In: YES
    user_id=203539

    > SDCC : mcs51/gbz80/z80/avr/ds390/pic14/TININative/xa51
    > 2.3.3 (Jan 27 2003) (MINGW32)
    Correct.

    > The creation date is Sunday, January 20, 2002, 1:12:06 PM
    > which seems a bit strange.
    This is exactly the creation date of Paul's sdcc.exe. You're
    obvioulsy mixing something.

    > This copy of SDCC is much larger than my previous copy:
    > 0.97 MB (1,024,512 bytes) vs 386 KB (395,264 bytes)
    Correct (reason still unknown).

    In the meantime I've downloaded Paul's as31-sdcc231-pj3-
    win32.zip. Even with his sdcc.exe I couldn't reproduce the
    SEGFAULT on Win2000 SP2.

    What OS and CPU do use? Is the foo.c appended to this bug
    report exactly the same, on which you run the tests?

    Please check your sdcc.exe and foo.c and try again!

     
  • Michael Newman

    Michael Newman - 2003-01-27

    Logged In: YES
    user_id=639857

    I'm running Windows 2000 SP 1 version 5.00.2195.
    The foo.c file is exactly what produced the failure originally.
    I downloaded the foo.c from the web site to repeat the tests.
    The same failures result on the version from PJRC and the
    1/27/2003 version.

    I get a similar bug report on NT 4 service pack 6. On NT I get
    a Dr. Watson bug report. Exception accessviolation
    [0x00005] at 0x00042a5bb

    The crashes occur after the production of this message:

    foo.c:33: warning: conditional flow changed by optimizer 'foo.c
    (29)':so said EVELYN the modified DOG

    On a computer without debugging tools installed running
    windows 2000 SP 1 I get a popup window that says an error
    has occured in your application it will be closed by windows.

     
  • Bernhard Held

    Bernhard Held - 2003-01-27
    • assigned_to: nobody --> bernhardheld
     
  • Bernhard Held

    Bernhard Held - 2003-01-27

    Logged In: YES
    user_id=203539

    Now I see the bug ... not on Win2000 SP2 Professional, but
    on a NT4 SP5 Server.

    The size difference of sdcc.exe depends simply on the
    number of configured ports. PRJ's sdcc is only for mcs51,
    while snapshot's sdcc is configured for:
    mcs51/gbz80/z80/avr/ds390/pic14/TININative/xa51

    Thanks for your patience!

     
  • Bernhard Held

    Bernhard Held - 2003-01-29
    • assigned_to: bernhardheld --> nobody
     
  • Johan Knol

    Johan Knol - 2003-02-02

    Logged In: YES
    user_id=63512

    fixed in src/mcs51/ralloc.c:1.95

     
  • Johan Knol

    Johan Knol - 2003-02-02
    • milestone: --> fixed
    • assigned_to: nobody --> johanknol
    • status: open --> closed
     

Log in to post a comment.