Thanks! Glad that the test model was helpful! :) And please do! I took some inspiration from the semimod OSDI manual where they show a (relatively outdated) potential C transpilation of a diode. Because I was trying to understand whether the issue was in ngspice or in OpenVAF, I found it particularly useful to bypass the VA compiltion and implement a test in C directly.
OSDI array parameters lead to segmentation fault
For anyone stumbilng into this, for future reference, what did the trick for me was to make sure to NOT be using the readline bundled in XCode (e.g. brew install redline or get if from MacPorts) and provide configure with the relevant CFLAGS and LDFLAGS on where to find the library and headers.