Menu

attempt to reference unallocated memory (signal sigsegv)

Anonymous
2022-07-28
2022-07-28
  • Anonymous

    Anonymous - 2022-07-28

    attempt to reference unallocated memory (signal sigsegv)

    compile: cobc -fstack-size=512 duplicate number of records processed

    with debug: libcob possible PERFORM depth exceeded

    ubuntu 22.04 GnuCOBOL 3.1.2

    Will be delighted to get some help... .

     
    • Simon Sobisch

      Simon Sobisch - 2022-07-28

      In nearly all cases this means you have an eternal inner loop.

      Compiling with -debug and let it run will already show you where this happens, so you have an option to check the program.
      You may want to compile with -ftrace and set COB_SET_TRACE=1 cobcrun yourprog to inspect this in depth, getting the PERFORMed paragraphs sections.

      One question (as this changes the stack change check a bit): is the program RECURSIVE (or "possibly" calls itself, for example via a copybook)?

       

Anonymous
Anonymous

Add attachments
Cancel