harbour / core

Portable, xBase compatible programming language and environment
https://harbour.github.io/
Other
324 stars 207 forks source link

Regression different output with dev-version 3.0.0 -> 3.2.0dev #75

Closed freakout42 closed 10 years ago

freakout42 commented 10 years ago

a small program which just writes to stdout (with -gtstd not screen oriented - console app) produces different output with development version

OS: uname -a: Linux bongo 2.6.18-371.6.1.el5.028stab112.3PAE #1 SMP

this program

EMPNO := 4711
ENAME := "SCOTT      "
  ?? EMPNO
  ?? " "
  ?? ENAME
  ?

with development version output has a double line for the empno variable and a lot of junk spaces - 3.0.0 version is clean

first the garbled development version: harbour-3.4.0dev-2 /opt/harbour/bin/hbmk2 test_dbs_clp_hrb_cmd.prg -gtstd Harbour 3.4.0dev () (2014-07-08 11:21) produces output

      4711
      4711 SCOTT

in hex

0000000 20 20 20 20 20 20 34 37 31 31 20 20 20 20 20 20
0000020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0000040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0000060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0000100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0000120 0a 20 20 20 20 20 20 34 37 31 31 20 53 43 4f 54
0000140 54 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0000160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0000200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0000220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0000240 20 0a
0000242

here the clean output from release version: harbour-3.0.0-2 Harbour 3.0.0 (Rev. 16951) produces output

      4711 SCOTT

in hex

0000000 20 20 20 20 20 20 34 37 31 31 20 53 43 4f 54 54
0000020 0a
0000021
vszakats commented 10 years ago

Please retest with current 3.2.0 and update your report.

[ If an issue is present in 3.2.0, it's best to report it here. If the issue happens only with a fork (like 3.4.0), always use the fork's own Issue page. ]

vszakats commented 10 years ago

Retested on Win7 with 3.2.0dev (mingw 4.9.0) and the problem is present (so the problem is not specific to the fork, nor to Linux)

Also confirming that 3.0.0 (mingw 4.5.2) works correctly on the same system.

vszakats commented 10 years ago

After reverting to this version of /src/rtl/gtstd/gtstd.c, the problem is gone: https://github.com/harbour/core/blob/1b4008723b01b67444e9baf50de4c90e6655f941/harbour/src/rtl/gtstd/gtstd.c

It means that this diff causes the regression: https://github.com/harbour/core/commit/93d3a46d843daaf6d08149d83fa5203ff910c484#diff-70 (giant commit, may load slowly)