Skip to content

Conversation

@aittalam
Copy link
Member

@aittalam aittalam commented Jan 16, 2026

Closes: #857
(see description there)

How to replicate the issue:

  • build the example code:
.cosmocc/4.0.2/bin/make o//tests/minja/test_comment_parsing
.cosmocc/4.0.2/bin/make o/tests/minja/test_comment_parsing_native
  • run the compiled executables:
# both should work on e.g. mac, while the cosmo build breaks on linux
./o/tests/minja/test_comment_parsing
./o/tests/minja/test_comment_parsing_native

How to test the fix:

> .cosmocc/4.0.2/bin/make check
...
.cosmocc/4.0.2/bin/cosmoc++ -frtti -std=gnu++23 -isystem llama.cpp/vendor -std=c++17 -c -o o//tests/minja/minja_integration_test.o tests/minja/minja_integration_test.cpp
.cosmocc/4.0.2/bin/cosmoc++  -o o//tests/minja/minja_integration_test o//tests/minja/minja_integration_test.o
o//tests/minja/minja_integration_test
Running minja integration tests (using actual minja.hpp)...
All 12 tests PASSED

# try without the patch
> cd llama.cpp
> git checkout vendor/minja/
> cd ..
> .cosmocc/4.0.2/bin/make check
.cosmocc/4.0.2/bin/cosmoc++ -frtti -std=gnu++23 -isystem llama.cpp/vendor -std=c++17 -c -o o//tests/minja/minja_integration_test.o tests/minja/minja_integration_test.cpp
.cosmocc/4.0.2/bin/cosmoc++  -o o//tests/minja/minja_integration_test o//tests/minja/minja_integration_test.o
o//tests/minja/minja_integration_test
Running minja integration tests (using actual minja.hpp)...
make: *** [build/rules.mk:88: o//tests/minja/minja_integration_test.runs] SIGSEGV (core dumped)

@aittalam aittalam changed the base branch from main to new_build_wip January 16, 2026 10:49
@aittalam aittalam self-assigned this Jan 16, 2026
@aittalam aittalam marked this pull request as ready for review January 20, 2026 12:34
@aittalam aittalam requested a review from peteski22 January 20, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: minja parsing segfaults in cosmo build

2 participants