Skip to content

Uncaught exception: abort() called but not implicitly defined #575

@h0nzZik

Description

@h0nzZik

The standard says in 15.3/9

If no matching handler is found, the function std::terminate() is called; whether or not the stack is unwound before this call to std::terminate() is implementation-defined.

This is implemented; however, somehow abort() gets called, and that gets stuck:

`BuiltinCallOp`(
	lvcpp(
		loc(obj(#token("0","Int"),#token("0","Int"),builtinCppSymbol(#token("\"abort\"","String"))),#token("0","Int")),
		`noTrace_CPP-TRACE-SYNTAX`(.KList),
		tcpp(
			quals(`.Set`(.KList)),
			`.Set`(.KList),
			cppFunctionType(
				tcpp(quals(`.Set`(.KList)),`.Set`(.KList),`void_CPP-TYPING-SYNTAX`(.KList)),
				`.List{"_,__CPP-TYPING-SORTS"}`(.KList),
				`noMethod_CPP-TYPING-SYNTAX`(.KList),
				`CLinkage_COMMON-SYNTAX`(.KList),
				`noexcept(false)_CPP-TYPING-SYNTAX`(.KList)
			)
		)
	),
	#token("false","Bool"),
	`.List`(.KList)
)

See https://github.com/kframework/c-semantics/blob/master/semantics/cpp/library/exception.k

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions