; Minimal repro for the #55-cutover drop-soundness crash: a string ; LITERAL passed by value into an `(own (con Str))` parameter that the ; callee drops (the param is not consumed/returned, so the Own-param ; drop path emits `ailang_rc_dec` on it). ; ; The literal is a `StrRep::Static` rodata constant with NO rc_header, ; so `ailang_rc_dec` reads the 8 bytes before the constant as a fake ; refcount and `free()`s a static address -> SIGSEGV. ; ; `usestr` (returns `s`) does NOT crash because the param is consumed, ; not dropped. `take_int` (own Int) does NOT crash because Int is a ; value type. The crash is specific to a static Str literal flowing ; into a dropped owned Str parameter. ; ; Expected stdout: `0` (module own_str_arg_drop (fn take (doc "Owned Str param, ignored (dropped in callee), returns 0.") (type (fn-type (params (own (con Str))) (ret (own (con Int))))) (params s) (body 0)) (fn main (type (fn-type (params) (ret (own (con Unit))) (effects IO))) (params) (body (seq (app print (app take "hi")) (do io/print_str "\n")))))