1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00
cde/src/lib/libast/regex
Martijn Dekker 38aab428bb Temporarily revert separate stack for libast/regex (re: 1aa8f771)
Welcome to AT&T engineering practices in action: a fix in one thing
breaks a completely unreleated thing, but only in very specific
and inscrutable circumstances.

Commit ffe84ee7 introduced a regression test failure in types.sh:

test types begins at 2021-12-14+23:57:35
	types.sh[130]: z.r.s should be z.r.x
test types failed at 2021-12-14+23:57:35 with exit code 1 [ 86 tests 1 error ]
test types(C.UTF-8) begins at 2021-12-14+23:57:35
test types(C.UTF-8) passed at 2021-12-14+23:57:35 [ 86 tests 0 errors ]
test types(shcomp) begins at 2021-12-14+23:57:35
test types(shcomp) passed at 2021-12-14+23:57:35 [ 86 tests 0 errors ]

Only enough, I've *only* found this regression on the GitHub CI
runner. I've tried it on three different regular Linux systems and
it occurs on none of them, nor on macOS.

Another odd thing: it only fails on the first of those three test
runs. But my experiments show it fails very consistently.

Through a process of systematic elimination in a test branch, I've
found that the failure is triggered by the change to using a
separate stack in the regex code. All the other changes are fine.

Using a separate stack improves the robustness of the regex code,
but it apparently exposes some breakage in how the very dodgy
'typeset -T' code is handling the stack, which was being masked by
sharing a stack with it. Or at least that seems like the most
plausible explanation to me right now.

So, until that breakage can be traced and fixed, the regex code now
shares the main stack with everything else again for the time being.

_____
Just to record this: by adding a couple of debug lines:

  typeset -p z | sed 's/^/[DEBUG] /'
  printf '[DEBUG] %s\n' "${z.r.s}" "${z.r.x}"

the symptom reveals itself more clearly on the GitHub runner:

  test types begins at 2021-12-15+17:25:57
  [DEBUG] Y_t z=(X_t r=(x=foo;y=bam;s=''))
  [DEBUG]
  [DEBUG] foo
          types.sh[132]: z.r.s should be z.r.x
  test types failed at 2021-12-15+17:25:57 with exit code 1 [ 86 tests 1 error ]
  test types(C.UTF-8) begins at 2021-12-15+17:25:57
  [DEBUG] Y_t z=(X_t r=(x=foo;y=bam;s=foo))
  [DEBUG] foo
  [DEBUG] foo
  test types(C.UTF-8) passed at 2021-12-15+17:25:57 [ 86 tests 0 errors ]
  test types(shcomp) begins at 2021-12-15+17:25:57
  [DEBUG] Y_t z=(X_t r=(x=foo;y=bam;s=foo))
  [DEBUG] foo
  [DEBUG] foo
  test types(shcomp) passed at 2021-12-15+17:25:57 [ 86 tests 0 errors ]
2021-12-16 09:08:44 +01:00
..
regalloc.c Various minor capitalization and typo fixes (#371) 2021-12-13 01:49:42 +01:00
regcache.c Various minor capitalization and typo fixes (#371) 2021-12-13 01:49:42 +01:00
regclass.c Various minor capitalization and typo fixes (#371) 2021-12-13 01:49:42 +01:00
regcoll.c libast: regex: backport robustness improvements from 93v- beta 2021-12-15 00:50:59 +01:00
regcomp.c Temporarily revert separate stack for libast/regex (re: 1aa8f771) 2021-12-16 09:08:44 +01:00
regdecomp.c libast: regex: backport robustness improvements from 93v- beta 2021-12-15 00:50:59 +01:00
regerror.c libast: regex: backport robustness improvements from 93v- beta 2021-12-15 00:50:59 +01:00
regexec.c libast: regex: backport robustness improvements from 93v- beta 2021-12-15 00:50:59 +01:00
regfatal.c Various minor capitalization and typo fixes (#371) 2021-12-13 01:49:42 +01:00
reginit.c Various minor capitalization and typo fixes (#371) 2021-12-13 01:49:42 +01:00
reglib.h Temporarily revert separate stack for libast/regex (re: 1aa8f771) 2021-12-16 09:08:44 +01:00
regnexec.c Temporarily revert separate stack for libast/regex (re: 1aa8f771) 2021-12-16 09:08:44 +01:00
regrecord.c Add ksh 93u+m contributors notice to 964 copyright headers 2021-04-26 00:19:31 +01:00
regrexec.c libast: regex: backport robustness improvements from 93v- beta 2021-12-15 00:50:59 +01:00
regstat.c Add ksh 93u+m contributors notice to 964 copyright headers 2021-04-26 00:19:31 +01:00
regsub.c Add ksh 93u+m contributors notice to 964 copyright headers 2021-04-26 00:19:31 +01:00
regsubcomp.c Various minor capitalization and typo fixes (#371) 2021-12-13 01:49:42 +01:00
regsubexec.c Various minor capitalization and typo fixes (#371) 2021-12-13 01:49:42 +01:00