BUF_STACK
after PL_STRINGS_MARK()
is released by the corresponding PL_STRINGS_RELEASE().
These macros should be used like below. Note that strings returned by
any of the Prolog functions between this pair may be invalidated.
... PL_STRINGS_MARK(); <operations involving strings> PL_STRINGS_RELEASE(); ...