You've already forked linux-packaging-mono
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
clang
clang-tools-extra
compiler-rt
libcxx
libcxxabi
cmake
fuzz
include
lib
src
test
libcxxabi
native
support
CMakeLists.txt
backtrace_test.pass.cpp
catch_array_01.pass.cpp
catch_array_02.pass.cpp
catch_class_01.pass.cpp
catch_class_02.pass.cpp
catch_class_03.pass.cpp
catch_class_04.pass.cpp
catch_const_pointer_nullptr.pass.cpp
catch_function_01.pass.cpp
catch_function_02.pass.cpp
catch_function_03.pass.cpp
catch_in_noexcept.pass.cpp
catch_member_data_pointer_01.pass.cpp
catch_member_function_pointer_01.pass.cpp
catch_member_function_pointer_02.pass.cpp
catch_member_pointer_nullptr.pass.cpp
catch_multi_level_pointer.pass.cpp
catch_pointer_nullptr.pass.cpp
catch_pointer_reference.pass.cpp
catch_ptr.pass.cpp
catch_ptr_02.pass.cpp
catch_reference_nullptr.pass.cpp
cxa_bad_cast.pass.cpp
cxa_bad_typeid.pass.cpp
cxa_thread_atexit_test.pass.cpp
dynamic_cast14.pass.cpp
dynamic_cast3.pass.cpp
dynamic_cast5.pass.cpp
dynamic_cast_stress.pass.cpp
exception_object_alignment.pass.cpp
incomplete_type.sh.cpp
inherited_exception.pass.cpp
lit.cfg
lit.site.cfg.in
noexception1.pass.cpp
noexception2.pass.cpp
noexception3.pass.cpp
noexception4.pass.cpp
test_aux_runtime.pass.cpp
test_aux_runtime_op_array_new.pass.cpp
test_demangle.pass.cpp.REMOVED.git-id
test_exception_address_alignment.pass.cpp
test_exception_storage.pass.cpp
test_fallback_malloc.pass.cpp
test_guard.pass.cpp
test_vector1.pass.cpp
test_vector2.pass.cpp
test_vector3.pass.cpp
testit
thread_local_destruction_order.pass.cpp
uncaught_exceptions.pass.cpp
unittest_demangle.pass.cpp
unwind_01.pass.cpp
unwind_02.pass.cpp
unwind_03.pass.cpp
unwind_04.pass.cpp
unwind_05.pass.cpp
unwind_06.pass.cpp
www
.arcconfig
.clang-format
.gitignore
CMakeLists.txt
CREDITS.TXT
LICENSE.TXT
libunwind
lld
lldb
llvm
openmp
polly
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mk
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
39 lines
971 B
C++
39 lines
971 B
C++
![]() |
//===----------------------- noexception1.pass.cpp ------------------------===//
|
||
|
//
|
||
|
// The LLVM Compiler Infrastructure
|
||
|
//
|
||
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
||
|
// Source Licenses. See LICENSE.TXT for details.
|
||
|
//
|
||
|
//===----------------------------------------------------------------------===//
|
||
|
|
||
|
// UNSUPPORTED: c++98, c++03
|
||
|
// REQUIRES: libcxxabi-no-exceptions
|
||
|
|
||
|
#include <cxxabi.h>
|
||
|
#include <exception>
|
||
|
#include <cassert>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
// namespace __cxxabiv1 {
|
||
|
// void __cxa_increment_exception_refcount(void *thrown_object) throw();
|
||
|
// }
|
||
|
|
||
|
unsigned gCounter = 0;
|
||
|
|
||
|
void my_terminate() { exit(0); }
|
||
|
|
||
|
int main ()
|
||
|
{
|
||
|
// should not call std::terminate()
|
||
|
__cxxabiv1::__cxa_increment_exception_refcount(nullptr);
|
||
|
|
||
|
std::set_terminate(my_terminate);
|
||
|
|
||
|
// should call std::terminate()
|
||
|
__cxxabiv1::__cxa_increment_exception_refcount((void*) &gCounter);
|
||
|
assert(false);
|
||
|
|
||
|
return 0;
|
||
|
}
|