-
Notifications
You must be signed in to change notification settings - Fork 1
Segfault (exit 139) when an import resolves into the KerML standard library via -I #1
Description
Version / pin
- sysml2 built from commit
130e2d3085affa36998838aa9d0736a11821ca1d
(2026年02月04日 21:23:44 +0100, subject: "import fixes") - Source:
https://github.com/zbigniewsobiecki/sysml2.git - Platform: macOS Darwin 25.5.0 arm64, locally built binary
Summary
sysml2 crashes with a segfault (exit code 139, no diagnostics emitted) whenever
validation is run with -I pointing at a directory containing KerML
standard-library files and the validated file's import resolves into that
directory.
Minimal reproduction
- Create a library directory containing
ScalarValues.kermlandBase.kerml
(from the OMG KerML 20250201 standard-library release; in our setup these
files are provisioned on disk under.sysand/lib/via sysand 0.1.7). - Take any SysML file whose import resolves into that directory, e.g. a file
containingprivate import ScalarValues::*;. - Run validation with the library path, e.g.
sysml2 -I lib/ test.sysml.
Observed: immediate segfault, exit 139, before any diagnostics are emitted.
The same crash chain reproduces when VectorValues.kerml is placed in the
-I directory.
Expected behavior
Validation completes successfully with standard-library names resolved from
the -I path.
What works as workaround baseline
Without -I, the same binary runs deterministically on our project slice:
exit 0 when clean, exit 2 with diagnostics. Parsing is clean (zero syntax
errors), semantic validation runs fully on the model's internal
cross-references, and the only diagnostics reported are the expected
standard-library-absence family: E3003 on the ScalarValues / ISQ / SI
namespaces and E3001 on names that only the standard library defines (e.g.
String, ISQ::* references) — 16 such diagnostics on our current 7-file
validation slice. The crash is specific to standard-library resolution, not
general operation.
Impact
This blocks full standard-library validation for any model that imports
standard namespaces — effectively all SysML v2 models using ScalarValues,
ISQ, or SI. Running without -I is viable only because the resulting
standard-library-absence diagnostics are treated as expected; that expected
family could mask a genuine diagnostic of the same codes.
Revisit trigger
We re-test on any published fix or newer commit that passes the minimal
reproduction above; on success we re-enable -I and require the diagnostics
on our validation slice to drop to zero. A separate, lower-priority tooling
issue (tracked by us as U-2) is on hold and parked; it will be revisited at
our Phase 4 boundary review.