Monday, September 16, 2024

Re: w3m -dump_extra segfault

On Mon, Sep 16, 2024 at 12:21:54PM +0200, Rene Kita wrote:
> On Sun, Sep 15, 2024 at 10:15:11PM +0200, Theo Buehler wrote:
> > See https://marc.info/?l=openbsd-misc&m=172641752723332&w=2 for
> > background. In short: 'w3m -dump_extra https://lobste.rs' crashes and
> > that breaks this emacs plugin.
> >
> > The below reverts the code change from
> >
> > https://git.sr.ht/~rkta/w3m/commit/e933cf831f32fd4cf763c64aa60e51dbf025ec94
> >
> > and makes lobste.rs, duckduckgo and google work with M-x w3m-browse-url
> > in emacs. The problem is that the hack results in loadSomething() being
> > called with a NULL loadproc, which it doesn't know how to handle. No
> > idea how this was supposed to work...
>
> The mentioned commit is faulty and will be reverted. The crash appears
> because it depends on another commit that is not merged yet and adds a
> NULL check later in the code to remove some UB with the DO_EXTERNAL
> macro.

Ok, that makes sense. It felt as if something was missing. Thanks for
the confirmation. I have committed this revert as a workaround since we
are getting the ports tree ready for our next release.

> I accidentally committed it, because from the commit message it appeared
> as a bug fix. Sorry for the trouble.

No worries. Happens.

> I still sense there might be a bug hiding somewhere, otherwise I
> wouldn't have made a commit, but I can't reproduce anymore.

FWIW, I haven't managed to produce a crash without the proc = NULL bit
while investigating this problem either.

No comments:

Post a Comment