|
From: | TAG |
Subject: | [Bug-GnuCOBOL] [GnuCOBOL 3.0-rc1] testsuite: 655 failed, 787 passed unexpectedly, and fix for problems |
Date: | Tue, 22 Jan 2019 14:32:36 -0700 |
the 655 fail was reported January 1, 2019, this is my fix for the problem. code change in cobc source code file codegen.c fixes problem. not sure if code will work on all C versions, however code should be easy to fix for other versions if the multi-redirection is a problem. following code change in codegen.c fixed test suite 655 error changed lines 4532 - 4537 (or about there if other changes have already been made to file) to have following code, if (f->parent) section was added to fix buffer overrun when n is to large. code section to change is in “output_initialize_one (struct cb_initialize *p, cb_tree x)” if (n > 2) { offset = size - n; size -= n; } else { offset = 0; } change to: if (n > 2) { offset = size - n; size -= n; if (f->parent) { // adjust ’n’ if ’n’ is to large it will cause a memset buffer overrun int n1 = 0; if (f->parent->size < f->offset + offset + n) { n1 = f->parent->size - f->offset - offset; if (n1 > 0) { n = n1; } } } } else { offset = 0; } —————————— for unexpected pass, of test 787 in testsuite change at_xfail=yes to at_xfail=no for test 787 ——————————
|
testsuite.log
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |