2.0 win: crash @goback

massimo
2014-08-28
2014-08-29
  • massimo

    massimo - 2014-08-28

    hi,
    loaded the last 2.0_nightly_r411_win32_vc11, august 28, I get a crash at the goback statement (win 7 64 bit)
    Here are two separate programs: after the call "prog_b", control never returns to prog_a

    edit: I may add this: commenting out the local-storage section in prog_b appears to fix the problem, so perhaps this is some way involved...

    prog_a.cob:

    identification division. 
    program-id. prog_a.
    data division.
    working-storage section.
    77  ws-stringA   pic x(10).
    procedure division.       
        move  "hi there"   to ws-stringA
        call  "prog_b"  using ws-stringA      
        display "back in prog_a"  *> this statement never reached 
        goback.
    

    prog_b.cob:

    identification division. 
    program-id. prog_b.
    data division.
    working-storage section. 
    77  ws-stringB   pic x(10).
    77  ws-callsB    pic 9(03).
    local-storage section.
    77  ls-string  pic x(10). 
    linkage section.
    77  lk-string  pic x(10). 
    
    procedure division  using  lk-string. 
        display "entered prog_b"           
        add   1  to  ws-callsB 
        move  lk-string to ws-stringB     
        move  lk-string to ls-string    
        display "exiting prog_b"      
        goback. *> crash here 
    

    thanks,
    massimo

     
    Last edit: Simon Sobisch 2014-08-28
    • Vincent (Bryan) Coen

      Hi;

      Try removing the LOCAL-STORAGE SECTION. line so that ls-string is in WS.

      Does it still fail?

      Vince

       
      Last edit: Simon Sobisch 2014-08-28
  • massimo

    massimo - 2014-08-28

    Vince,

    Yes, removing the local-storage section header in prog_b fixes the problem.

     
    Last edit: massimo 2014-08-28
    • Vincent (Bryan) Coen

      You need to update the bug report to specify that this is a bug with the
      Local-storage processing.

      Vince

      On 28/08/14 13:05, massimo wrote:

      Vince,

      Yes, commenting out the local-storage section in prog_b appears to fix
      the problem.


      2.0 win: crash @goback
      https://sourceforge.net/p/open-cobol/discussion/help/thread/5cabaf2e/?limit=25#3fd2

       
      • Simon Sobisch

        Simon Sobisch - 2014-08-28

        Change of title is only possible in tickets, not in the forums (which is quite disturbing)...

        There is a ticket for SF (open since 2013): https://sourceforge.net/p/forge/feature-requests/164/ - please upvote it and maybe leave a note as tickets with most upvotes are checked first.

        Simon

         
      • Simon Sobisch

        Simon Sobisch - 2014-08-28

        But you're right, a chrash is better placed in the bug tracker, with a link in the discussion where it was first published.

        Simon

         
  • Simon Sobisch

    Simon Sobisch - 2014-08-28

    Not tested with WIN builds yet, but unix binaries work fine.

    Simon

     
  • massimo

    massimo - 2014-08-28

    Simon,

    yes it appears the problem is win only.

     
  • Simon Sobisch

    Simon Sobisch - 2014-08-28

    There's still something wrong, either with mpir (I've just took the 2.6.0 release and compiled it with vc11, supported out-of-the-box, no changes necessary) or with GCs own memory handling.

    Please download the win_prerequistes and exchange the current mpir.dll with the one found in Win32\Debug, this can be considered as workaround (no assertion in this program any more). Checking the memory involved likely needs some time.

    Simon

     
  • massimo

    massimo - 2014-08-29

    Simon,

    it appers the mpir.dll in win_prerequistes is the same as the one in the distro...

    btw, the win_prerequistes 7z has disappeared from the download page.

    anyway, I posted [bugs:#91]

    thanks,
    massimo

     

    Related

    Bugs: #91


    Last edit: Simon Sobisch 2014-08-29


Anonymous

Cancel  Add attachments





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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks