Skip to content

Commit

Permalink
Merge SVN 3973
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Jun 8, 2024
1 parent 4bf4302 commit e31913b
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 11 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@

* CMakeLists.txt: added, builds on Ubuntu and maybe Windows

2020-11-21 Simon Sobisch <simonsobisch@gnu.org>

* configure.ac, NEWS: explicit note about obsolete OpenCOBOL-EXTFH
and BorlandC

2020-11-12 Simon Sobisch <simonsobisch@gnu.org>

* m4/ax_ac_define_resolved.m4: fixed resolving passed --prefix
Expand Down
3 changes: 2 additions & 1 deletion libcob/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -3418,7 +3418,7 @@ cob_module_free (cob_module **module)

/* save module environment - returns an allocated cob_func_loc (free at cob_restore_func)
and the intermediate return field (must be freed by caller) */
void *
struct cob_func_loc *
cob_save_func (cob_field **savefld, const int params,
const int eparams, ...)
{
Expand All @@ -3433,6 +3433,7 @@ cob_save_func (cob_field **savefld, const int params,

/* Allocate return field */
*savefld = cob_malloc (sizeof (cob_field));

/* Allocate save area */
fl = cob_malloc (sizeof (struct cob_func_loc));
fl->func_params = cob_malloc (sizeof (void *) * ((size_t)numparams + 1U));
Expand Down
4 changes: 2 additions & 2 deletions libcob/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -1902,8 +1902,8 @@ COB_EXPIMP cob_field *cob_function_return (cob_field *);
COB_EXPIMP void cob_check_version (const char *, const char *,
const int);

COB_EXPIMP void *cob_save_func (cob_field **, const int,
const int, ...);
COB_EXPIMP struct cob_func_loc *cob_save_func (cob_field **,
const int, const int, ...);
COB_EXPIMP void cob_restore_func (struct cob_func_loc *);

COB_EXPIMP void cob_accept_arg_number (cob_field *);
Expand Down
4 changes: 2 additions & 2 deletions po/gnucobol.pot
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# LANGUAGE translation for GnuCOBOL.
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
# This file is distributed under the same license as the gnucobol package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
Expand Down
10 changes: 4 additions & 6 deletions tests/testsuite.src/run_misc.at
Original file line number Diff line number Diff line change
Expand Up @@ -1367,13 +1367,11 @@ AT_DATA([callee.cob], [
WORKING-STORAGE SECTION.
77 STOPPER PIC 9 EXTERNAL.
PROCEDURE DIVISION.
IF STOPPER = 9
DISPLAY 'OK' NO ADVANCING END-DISPLAY
STOP RUN
ELSE
IF STOPPER = 8
DISPLAY 'OK' NO ADVANCING END-DISPLAY.
IF STOPPER NOT = 9
ADD 1 TO STOPPER END-ADD
CALL "callee2" END-CALL
END-IF.
CALL "callee2" END-CALL.
GOBACK.
])

Expand Down
40 changes: 40 additions & 0 deletions tests/valgrind.supp
Original file line number Diff line number Diff line change
@@ -1,16 +1,56 @@
# bash is internally used in the test runner an possibly by make
# but we don't care about it as external tool
{
bashMemoryLeak
Memcheck:Leak
...
obj:/bin/bash
}

# issue that normally has to be checked manually once, as long as
# endwin and possibly _nc_free_all is called then we did everything
# we should do to free up the memory
#{
# ncursesMemoryLeakInit
# Memcheck:Leak
# match-leak-kinds: reachable
# fun:*alloc
# ...
# fun:newterm
# fun:initscr
#}

# minor color leak, no problem as not called too often
{
ncursesMemoryLeakColor
Memcheck:Leak
match-leak-kinds: reachable
fun:calloc
...
fun:start_color_sp
}

# that's a potential issue (but external) as a refresh is done quite often
{
ncursesMemoryLeakRefresh
Memcheck:Leak
match-leak-kinds: reachable
fun:*alloc
...
fun:wrefresh
}

# BDB issue, can't be solved by us as the part is from its "internal" structure
# Old BDB issue, at least existing from 4.x to 5.3
{
bdbBadJump
Memcheck:Cond
fun:__bam_stkrel
fun:__bamc_put
fun:__dbc_iput
}

# Another old BDB issue, at least existing from 4.x to 5.3
{
bdbBadWrite
Memcheck:Param
Expand Down

0 comments on commit e31913b

Please sign in to comment.