mdashti opened a new pull request, #23198:
URL: https://github.com/apache/datafusion/pull/23198

   ## Which issue does this close?
   
   None filed. This fixes a flaky SIGSEGV in the `extended` CI, where the 
`datafusion-sql` lib test binary crashes during the deep-recursion tests.
   
   ## Rationale for this change
   
   `test_stack_overflow` builds an N-deep `OR` chain and calls 
`sql_expr_to_logical_expr` directly, up to depth 8192. The planner is 
`#[recursive]`-protected, but the real entry point widens the `recursive` red 
zone with `StackGuard::new(256 * 1024)` (`query.rs`). The test skips that 
guard, so it runs on the default red zone, which the unparser fix for #23056 
already documented as too small for the deepest paths. The deepest cases 
overflow the OS stack and SIGSEGV the test binary: flaky with 
`recursive_protection` on, and overflowing by design without it. It only shows 
on CI, where the Linux runner's default stack is smaller than a local macOS one.
   
   ## What changes are included in this PR?
   
   Gate the generated tests on `recursive_protection` (they assert the 
protected behavior; without it the planner isn't stack-safe for deep input) and 
install the same `StackGuard` the real planner uses. This mirrors the unparser 
regression test.
   
   ## Are these changes tested?
   
   These are tests. The deep cases pass reliably with the guard, and are gated 
out without `recursive_protection`.
   
   ## Are there any user-facing changes?
   
   No.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to