bug-gnucobol
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-GnuCOBOL] Compiler crashes in empty perform when debugging mode


From: Edward Hart
Subject: Re: [Bug-GnuCOBOL] Compiler crashes in empty perform when debugging mode was specified
Date: Thu, 13 Apr 2017 22:15:01 +0100

Hello,

The fix is correct. The debugging code was to set DEBUG-CONTENTS; this should only happen for a "PERFORM procedure" statement, not inline loops.

Edward

On 13 April 2017 at 18:39, Simon Sobisch <address@hidden> wrote:
Hi Harald,

nice to hear that you find the compiler useful. Please report about your
project and minor flaws cobc does not accept in the user list
gnucobol-users. Despite of that fixing code (including COBOL code) is
always a better idea than a too laxed syntax check you may want to try
to recompile with -frelax-syntax. It would be good to know if there are
some COBOL code flaws that aren't compiled with this flag (if you get
"obsolete" messages you may silence them, too [they are in because the
recent COBOL standards mark them as obsolete]).

Concerning the bug: thank you for posting this, a SIGSEGV should never
occur. I could reproduce it and put a fix for the SIGSEGV in. It doesn't
crash any more but the debugging code that is normally generated won't
be added in the empty inline PERFORM - I'm not sure if this is correct
and asked Edward Hard to recheck this (I'm away for the next days + week).
If anybody knows what the correct thing to do is please respond.
In any case you either add the CONTINUE or - if these are too many
places use the current svn version.

Simon

Am 13.04.2017 um 10:47 schrieb Harald Cordes | ITGAIN:
> Hi,
>
>
>
> I’m evaluating the usability of the GNU-COBOL-compiler for our purposes.
>
> It looks good. I’ve found some issues we have to cope with,
>
> e.g. where the compiler does not tolerate some minor flaws
>
> and I’ve found a real bug. It’s a very minor one but I’d like to report it.
>
>
>
> Adding a simple continuewithin the body of the inline-perform solves the
> problem.
>
>
>
> The following program causes a crash of the GNU-COBOL-compiler:
>
>
>
>
>
>        SOURCE-COMPUTER. IBM-390 WITH DEBUGGING MODE.
>
>
>
>            PERFORM VARYING IND1 FROM 10 BY -1
>
>                    UNTIL TST(IND1:1) NOT = SPACE
>
>            END-PERFORM.
>
>
>
> Message:
>
>
>
> attempt to reference unallocated memory (signal SIGSEGV)
>
>
>
> cobc: aborting compile of PERFFAIL.cbl at line 16
>
>
>
>
>
> I’m using GNU-COBOL:
>
>
>
> Built     Apr 12 2017 11:00:55
>
> *Packaged  Nov 06 2016 22:36:19 UTC*
>
> C version "4.3.2 [gcc-4_3-branch revision 141291]"
>
>
>
> Operating-System – uname -a:
>
> Linux j2u-devel-hc 2.6.27.54-0.2-default #1 SMP 2010-10-19 18:40:07
> +0200 x86_64 x86_64 x86_64 GNU/Linux
>
>
>
>
>
> Best regards / mit freundlichem Gruß
>
> Harald Cordes
>
> IT-Berater
>
> Mobil:     +49 152 0785 4210
> Email:     address@hidden <mailto:address@hiddende>
>
>
>
> *ITGAIN Consulting Gesellschaft für IT-Beratung mbH*
>
> Essener Str. 1
>
> 30173 Hannover
>
> Tel.:        +49 511 51 51 3700
>
> Fax.:       +49 511 51 51 3800
>
>
> *ITGAIN – Kompetenz gewinnbringend einsetzen***
>
> * *
>
> Sitz: Hannover
>
> Geschäftsführer: Thomas Kalb, Per Stricker, Norbert Wilkening
> eingetragen beim Amtsgericht Hannover unter HRB 59246 Ust-IDNr. DE214508933
>
>
>
>
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]