I am getting an nnpchecker error in a build: [new release] dream-html (0.0.2) by yawaramin · Pull Request #23786 · ocaml/opam-repository · GitHub
The message is:
#=== ERROR while compiling dream-html.0.0.2 ===================================#
# context 2.2.0~alpha~dev | linux/x86_64 | ocaml-options-only-nnpchecker.1 | pinned(https://github.com/yawaramin/dream-html/releases/download/v0.0.2/dream-html-0.0.2.tbz)
# path ~/.opam/4.14/.opam-switch/build/dream-html.0.0.2
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p dream-html -j 127 @install @runtest
# exit-code 1
# env-file ~/.opam/log/dream-html-7-5933ac.env
# output-file ~/.opam/log/dream-html-7-5933ac.out
### output ###
# File "test/dune", line 2, characters 7-22:
# 2 | (name dream_html_test)
# ^^^^^^^^^^^^^^^
# (cd _build/default/test && ./dream_html_test.exe)
# <!DOCTYPE html>
# <html lang="en"><head><title>Dream_html Test</title>
# </head>
# <body id="test-content"><main spellcheck="true"><article id="article-1" class="story"><p data-hx-get="/p1?a%20b" data-hx-target="closest article > p">Test para 1.</p>
# <p>Test para 2.</p>
# <a href="/a?b=cd:efg/hij">cd:efg/hij</a>
# <a href="/%F0%9F%98%89">wink</a>
# </article>
# <input type="text" autocomplete="name" onblur="if (1 > 0) alert(this.value)"><!-- oops --><script>alert('lol')</script> -->
# <dialog open><div></div>
# </dialog>
# <template id="idtmpl"><p>Template</p>
# </template>
# <div translate="no"><p translate="yes"></p>
# </div>
# <textarea required data-hx-trigger="keyup[target.value.trim() != '']" autocapitalize="words">super</textarea>
# <hr class="super"><p id="greet-Bob">Hello, Bob!</p>
# </main>
# </body>
# </html>
#
# Out-of-heap pointer at 0x5616480e3210 of value 0x561647f87180 has non-black head (tag=65)
#
# Out-of-heap pointers were detected by the runtime.
# The process would otherwise have terminated normally.
# File "test/dune", line 5, characters 0-65:
# 5 | (rule
# 6 | (with-stdout-to
# 7 | got.html
# 8 | (run ./dream_html_test.exe)))
# (cd _build/default/test && ./dream_html_test.exe) > _build/default/test/got.html
# Out-of-heap pointer at 0x55dd1c32e210 of value 0x55dd1c1d2180 has non-black head (tag=65)
#
# Out-of-heap pointers were detected by the runtime.
# The process would otherwise have terminated normally.
The test is defined here: dream-html/dune at v0.0.2 · yawaramin/dream-html · GitHub
It is a dune diff action. The test binary writes to standard output, dune captures it in a file and diffs it with another file. If they are the same then the test passes. This is working for me locally with OCaml 4.14 stock version. But it’s failing in Opam-CI with the ‘no naked pointers’ check.
Any ideas how to debug?