Replace the GCC/Clang-only weak symbol with a plain flag the shim defines
(at namespace scope, external linkage) and the worker's main() sets when it
is linked with its NLib --wrap wrappers. Verified the non-Linux branch by
forcing it on Linux: the worker builds without __wrap_ symbols and refuses
every extension step; the regression now asserts that per platform.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
FFI guards now refuse only what C++ cannot handle, each probed against the
isolated worker:
- drop the 1e6 coordinate cap, the 1e-3 transform-scale floor, the 1e3
extension-distance cap and the 1e-6 revolution generator minimum (offset
callers only; surf_of_revolution_p1's in-process calls keep it);
- orders: cap 64 (caller array bound; upstream refuses >3 before writing);
UB-116 moves into the worker on the actual compound distance, so zero
offsets are compared;
- box guard follows CalculateBoundingBox level by level against each
offset's own m_pSurface instead of only the innermost base.
Remaining refusals are UB-107 and HANG-6, the latter by a 20,000-call
arc-length work bound (normal searches: <=45) instead of the deadline.
Worker: a timeout is rerun once with 60 s before it is a harness failure;
off Linux it is built without GNU ld --wrap and the shim refuses extension
steps instead of running them unguarded.
Dispatch: new BaseOffset op compares GetBaseSurface()->CreateOffsetSurface
through SmSurface* (4 fixtures, 81 generated over every base kind).
Generator covers magnitudes 1e-9..1e150, tiny revolutions, zero/negative
scales and orders up to 8 (484 such cases pass, 41,252 values).
nurb_of documented: a NURB-less revolution base is UB upstream before
GetOrCreateGwNurbPointer runs. nurbs.b_spline_surface_p1 note counts fixed.
surface.offset_surface: 3066 cases, 2853 pass, 0 failed, 213 deferred;
6000 seeds: 6066 cases, 5620 pass, 0 failed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Two generated cases became reachable once surface_p3..p5 landed and hit
upstream undefined behaviour already filed on main:
- UB-107: CreateExtendedSurface retries a failed in-place N_SrfExtendByDist
on half-written arrays. The offset worker wraps N_SrfExtendByDist and
N_SrfCopy and rejects a read of such a surface (candidate discarded at
generation, never counted as a pass).
- UB-32: ST_surxsdr's degree-1 reflection fallback reads Rw[ii][kby+2] past
its row. As nlib.srf_adv_p1 does, the generator keeps reflection
extensions of a degree-1 NURB to C-max.
Also relabel the offset arm of the surface cache box callback as a dispatch
gap (surface_p6 has landed; the callback lacks a kernel and the guesses),
and refresh face_p2 / intersector headers.
difftest --green: 174 units, 98 passed, 76 partial, 0 failed.
surface.offset_surface: 3062 cases, 2849 pass, 0 failed, 213 deferred
(surface_point_solve_p3); 6000 seeds: 6062 cases, 5611 pass, 0 failed.
Promoted: topology.face_p2 (offset deferrals 112 -> 0), topology.brep_data
(46 -> 0), blend.fillet_custom_solver (401 pass), surface.surface_p7,
nurbs.b_spline_surface_p1, mass.integrator.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>