gerbil icon indicating copy to clipboard operation
gerbil copied to clipboard

string-join segmentation fault: 11

Open n3mo opened this issue 4 years ago • 3 comments

Calling (string-join strs char) with a non-string in strs leads to a segmentation fault rather than an error. This is easy to replicate in interpreted or compiled code:

;;; The following will lead to a segfault
(string-join '("gerbil" #f) " ")
;;; or
(string-join '("gerbil" 1) " ")

Other values can lead to segfaults and/or an unresponsive REPL:

(string-join '("gerbil" '()) " ")
;;; or
(string-join '("gerbil" (void)) " ")

Tested on Mac OS 10.15.6

n3mo avatar Oct 09 '20 03:10 n3mo

what version are you using? this should be fixed in master.

vyzo avatar Oct 09 '20 05:10 vyzo

Apologies, rookie omission. I'm running Gerbil v0.16 on Gambit v4.9.3 (installed from Homebrew).

n3mo avatar Oct 09 '20 14:10 n3mo

no problem!

vyzo avatar Oct 09 '20 16:10 vyzo