<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>FFI on DevTrace — 글로벌 개발 에러 트러블슈팅</title><link>https://tokkabi.com/tags/ffi/</link><description>Recent content in FFI on DevTrace — 글로벌 개발 에러 트러블슈팅</description><generator>Hugo -- 0.125.0</generator><language>ko</language><lastBuildDate>Fri, 11 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tokkabi.com/tags/ffi/index.xml" rel="self" type="application/rss+xml"/><item><title>Rust panic을 C++에서 try/catch로 잡을 수 없는 이유 — FFI 경계 예외 전파의 근본 원인</title><link>https://tokkabi.com/posts/capturing-rust-generated-panic-as-c-exception/</link><pubDate>Fri, 11 Sep 2026 00:00:00 +0000</pubDate><guid>https://tokkabi.com/posts/capturing-rust-generated-panic-as-c-exception/</guid><description>Rust staticlib에서 발생한 panic!()을 g++로 링크한 C++ main의 try/catch로 잡으려 했지만 잡히지 않는 문제를 다룹니다. 근본 원인은 Rust가 제공하는 것은 C++ FFI가 아니라 C FFI이며, C에는 예외 개념 자체가 없어 예외 전파 ABI가 정의되어 있지 않다는 점입니다. 올바른 해법은 catch_unwind로 FFI 경계에서 panic을 오류 반환값으로 번역한 뒤 C++에서 처리하거나 다시 throw하는 것입니다. rustc 1.98.1/g++ 11.4.0 환경에서 실제 재현·검증한 결과를 포함합니다.</description></item></channel></rss>