id summary reporter owner description type status priority milestone component version resolution keywords cc difficulty 1424 (const c-string) as result type breaks with NULL Vasilij Schneidermann "I'm writing bindings to a library which uses `const` on both string argument and return types. If I declare a foreign function returning `NULL` to have `(const c-string)` as return type, I get a segmentation violation, `c-string` as return type however returns `#f` as expected. Minimal repro: {{{#!scheme (import chicken scheme foreign) #> static const char* test() { return NULL; } <# (define test (foreign-lambda c-string ""test"")) (define test2 (foreign-lambda (const c-string) ""test"")) (test) ;=> #f (test2) ;=> segfault }}}" defect closed minor 4.13.0 compiler 4.11.0 fixed foreign