JosiahWI commented on code in PR #13683:
URL: https://github.com/apache/trafficserver/pull/13683#discussion_r4532804675


##########
tests/uranium_tests/pluginTest/regex_remap/test_regex_remap.py:
##########
@@ -178,6 +194,31 @@ def run_matching_checks(*, _ats: ATS, _curl: Curl, 
_transactions: list[dict[str,
     )
     assert "HTTP/1.1 200 OK" in output and "uuid: 180" in output
     wait_for_file_lines(_ats.diags_log, r"ERROR: .regex_remap. Bad regular 
expression result -47", 1)
+    run_jit_stack_exhaustion_check(_ats=_ats, _curl=_curl)

Review Comment:
   Nit: this call is at the wrong level of abstraction, I think. It should go 
in the same place as the `run_matching_checks` call, not inside 
`run_matching_checks`. Conceptually, `run_jit_stack_exhaustion_check` is 
testing something a bit different, and the naming suggests the two functions 
are at the same level of abstraction, so it's weird for one to call the other.



##########
src/traffic_layout/info.cc:
##########
@@ -182,6 +182,37 @@ produce_features(bool json)
   print_feature("TS_HAS_128BIT_CAS", TS_HAS_128BIT_CAS, json);
   print_feature("TS_HAS_128BIT_CAS_LIBATOMIC", TS_HAS_128BIT_CAS_LIBATOMIC, 
json);
   print_feature("TS_HAS_TESTS", TS_HAS_TESTS, json);
+  // Whether PCRE2 can run a pattern on the just-in-time engine. This is a 
property of the
+  // PCRE2 that ATS is linked against, not of ATS. Only the JIT has a stack to 
exhaust: the
+  // interpreter keeps its backtracking frames on the heap, so a subject that 
fails with a
+  // JIT stack error can match on the interpreter. Tests that assert on that 
error need to
+  // know which engine runs.
+  //
+  // PCRE2_JIT_TEST_ALLOC (PCRE2 10.45) also confirms the JIT can allocate 
executable
+  // memory. PCRE2_CONFIG_JIT does not, and reports 1 on a hardened runtime 
where every JIT
+  // compile then fails, which is the direction that misleads a test gate.
+  {

Review Comment:
   Nit: this block could be extracted to a helper function so that the 
`print_feature` section flows cleanly without this low-level interruption.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to