# Finding all unsafe code in a large C wrapper

**URL:** https://discourse.julialang.org/t/finding-all-unsafe-code-in-a-large-c-wrapper/133103
**Category:** General Usage
**Tags:** question
**Created:** [October 13, 2025, 8:10am UTC](https://discourse.julialang.org/t/finding-all-unsafe-code-in-a-large-c-wrapper/133103 "2025-10-13T08:10:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jw3126](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jw3126/32/3086_2.png) [@jw3126](https://discourse.julialang.org/u/jw3126)
#### Post date: [October 13, 2025, 8:10am UTC](https://discourse.julialang.org/t/finding-all-unsafe-code-in-a-large-c-wrapper/133103/1 "2025-10-13T08:10:53Z")

</div>

I have a large julia wrapper of C code. It contains some undefined behavior. For instance, it might allocate a Vector, put a pointer to the vector in some struct, pass that struct to a C-API without any `GC.@preserve` on the original vector.  
Are there tools that can help find such unsafe code areas?
