forked from OCamlPro/gnucobol
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check for internal memory bounds with new flag "memory-check" (implie…
…d with --debug) related to [bugs:#896] some validation of internal memory used during CALL; this can help in finding otherwise hard to diagnose overwrite of memory and as it is only done on CALL has a much smaller footprint than -fec=bounds (as both check different aspects at different places it is also reasonable to use both) cobc: * flag.def, cobc.c (cobc_deciph_memory_check), tree.h: new compile flag -fmemory-check, implied with --debug * typeck.c (cb_emit_call), tree.h (cb_field): new field attribute flag_used_in_call * codegen.c (output_local_base_cache, output_nonlocal_base_cache): generate fencing data fields for fields with flag_used_in_call * codegen.c (output_call_cache): generate fencing data fields for cob_call_union fields (call pointers) * codegen.c (output_memory_check_call): new function to output generate fencing data fields for flag_used_in_call * codeoptim.def, codeoptim.c, codegen.c: new entry COB_CHK_MEMORYFENCE additional: * codegen.c: only increment/decrement output_indent_level by indent_adjust_level * restored some parts of codeoptim.c done by Ron in [r3542] which somehow got lost in 3.x libcob: * common.c (cob_check_fence), common.h: new function to check for writing outside of COBOL data, triggered with compile option -fmemory-check * statement.def (STMT_BEFORE_CALL, STMT_BEFORE_UDF): new internal statements, currently used for cob_check_fence additional: * common.c (b2i): include marker for invalid data (previously not set)
- Loading branch information
sf-mensch
committed
Jul 10, 2023
1 parent
4e7a61d
commit ccd3b7f
Showing
15 changed files
with
537 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,24 @@ | ||
|
||
2023-07-10 Simon Sobisch <[email protected]> | ||
|
||
check for internal memory bounds with new flag "memory-check" | ||
* flag.def, cobc.c (cobc_deciph_memory_check), tree.h: new compile | ||
flag -fmemory-check, implied with --debug | ||
* typeck.c (cb_emit_call), tree.h (cb_field): new field attribute | ||
flag_used_in_call | ||
* codegen.c (output_local_base_cache, output_nonlocal_base_cache): | ||
generate fencing data fields for fields with flag_used_in_call | ||
* codegen.c (output_call_cache): generate fencing data fields for | ||
cob_call_union fields (call pointers) | ||
* codegen.c (output_memory_check_call): new function to output | ||
generate fencing data fields for flag_used_in_call | ||
* codeoptim.def, codeoptim.c, codegen.c: new entry | ||
COB_CHK_MEMORYFENCE | ||
|
||
additional | ||
* codegen.c: only increment/decrement output_indent_level by | ||
indent_adjust_level | ||
|
||
2023-07-07 Simon Sobisch <[email protected]> | ||
|
||
common preparser cleanup | ||
|
@@ -2635,7 +2655,8 @@ | |
|
||
* codeoptim.def (COB_GET_NUMDISPS), codeoptim.c, codegen.c: new routine | ||
to convert signed DISPLAY into binary value; | ||
use of register attribute for cob_get_numdisp + cob_get_numdisps | ||
* codeoptim.def (cob_get_numdisp, cob_get_numdisps): use of register | ||
attribute and skipping of leading zeroes | ||
|
||
2020-04-23 Simon Sobisch <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.