gerbil icon indicating copy to clipboard operation
gerbil copied to clipboard

Segfault using leveldb on macos catalina

Open xpqz opened this issue 5 years ago • 5 comments

Gerbil v0.15.1 on Gambit v4.9.3 (macos catalina 10.5, homebrew)

(import :std/db/leveldb
	     :std/sugar
	     :std/text/json)

(def (put! db id doc)
  (leveldb-put db id (json-object->string doc)))

(def (main)
  (def ldb (leveldb-open "test.level"))

  (def doc (hash ("name" "bob")
		 ("foo" 5)))

  (put! ldb "7c8808060eeff1dd1fdff858f5b94226" doc)

  (leveldb-close ldb))

(main)

gives me Segmentation fault: 11

Running the same thing in the docker install works fine.

xpqz avatar Nov 01 '19 09:11 xpqz

Seems like it's the import statement itself:

(import :std/db/leveldb)

(def (main)
  (println "hello"))

(main)

also segs.

xpqz avatar Nov 01 '19 10:11 xpqz

It seems most likely something with the way it was compiled, either gebil/gambit or leveldb in homebrew.

vyzo avatar Nov 01 '19 10:11 vyzo

ping @ober

vyzo avatar Nov 01 '19 15:11 vyzo

This is an issue with the leveldb in homebrew. It segfaults on Mojave as well.

ober avatar Nov 01 '19 15:11 ober

This is also seen on Linux and FreeBSD.

ober avatar Nov 13 '22 20:11 ober