Skip to content

Commit a72a8d3

Browse files
committed
[cilksan] Add hooks for cxa_throw and exit.
1 parent 7bd3a75 commit a72a8d3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

cilksan/libhooks.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,22 @@ __csan___cxa_atexit(const csi_id_t call_id, const csi_id_t func_id,
855855
MAAPs.pop();
856856
}
857857

858+
CILKSAN_API void __csan___cxa_throw(const csi_id_t call_id,
859+
const csi_id_t func_id, unsigned MAAP_count,
860+
const call_prop_t prop,
861+
void *thrown_exception,
862+
std::type_info *tinfo,
863+
void (*dest)(void *)) {
864+
if (!CILKSAN_INITIALIZED)
865+
return;
866+
867+
if (!should_check())
868+
return;
869+
870+
for (unsigned i = 0; i < MAAP_count; ++i)
871+
MAAPs.pop();
872+
}
873+
858874
CILKSAN_API void __csan___isoc99_scanf(const csi_id_t call_id,
859875
const csi_id_t func_id,
860876
unsigned MAAP_count,
@@ -1469,6 +1485,12 @@ CILKSAN_API void __csan_execvpe(const csi_id_t call_id, const csi_id_t func_id,
14691485
check_read_bytes(call_id, filename_MAAPVal, filename, strlen(filename) + 1);
14701486
}
14711487

1488+
CILKSAN_API void __csan_exit(const csi_id_t call_id, const csi_id_t func_id,
1489+
unsigned MAAP_count, const call_prop_t prop,
1490+
int exit_code) {
1491+
return;
1492+
}
1493+
14721494
CILKSAN_API void __csan_expf(const csi_id_t call_id, const csi_id_t func_id,
14731495
unsigned MAAP_count, const call_prop_t prop,
14741496
float result, float arg) {

0 commit comments

Comments
 (0)