Literate
Literate copied to clipboard
SIGSEGV on OSX when compiling
When lit is compiling as well as weaving, I get SIGSEGV. Top of my file is:
@code_type c++ .cpp @comment_type // %s @compiler lit -t main3.lit && g++ -c main3.cpp
It has compile errors. When I run lit -c
, I get
'lit -c main3.lit' terminated by signal SIGSEGV (Address boundary error)
I think this is because the compiler outputs lines that lit can not process.
This is in main.lit
:
auto matches = matchFirst(line, r);
string linenum = matches["linenum"];
string fname = matches["filename"];
string message = matches["message"];
I think one needs to first check if matches
is empty. For example, if I condition the rest with
if( !matches.empty ) {
I don't get SIGSEGV, lit exits normally. I'm not sure if the best is if
or assert
.
I thought D won't have these annoying SIGSEGV!